Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASoC: SOF: Intel: hda: Create debugfs file to force a clean DSP boot #4738

Conversation

ujfalusi
Copy link
Collaborator

@ujfalusi ujfalusi commented Dec 8, 2023

When IMR boot is supported on a platform it is always going to be used to boot the DSP unless some catastrophic event happens. There is no way for a developer to force a clean DSP boot without removing and re-inserting the modules.

Create a 'request_cold_boot' debugfs file which can be used to force the next DSP boot as clean (prune) boot.

Copy link

@jsarha jsarha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks quite straight forward, provided that hdev->skip_imr_boot works.

Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR would not work for MTL+, see below

debugfs_create_bool("request_cold_boot",
0644, sdev->debugfs_root,
&hdev->skip_imr_boot);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not call is 'skip_imr_boot' then? I find 'cold-boot' confusing because we run this code path during reboot aka warm boot...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also have a post_fw_run in mtl.c and lnl.c!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other name that came up was request_dsp_cold_boot to imply that it is only for the next DSP boot.
I'm fine naming it skip_imr_boot though.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option has a slight flaw and would work only to skip IMR boot for the second iteration of FW boot after the value is written isnt it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063, it will skip the IMR boot at the next DSP boot.
If the DSP was off then the next boot will be a 'clean' boot.
If the DSP was not off then it needs to be power cycled.

@ujfalusi ujfalusi force-pushed the peter/sof/pr/hda_force_prune_boot_01 branch from 1757235 to 8e36a19 Compare December 14, 2023 07:37
@ujfalusi ujfalusi requested a review from dbaluta as a code owner December 14, 2023 07:37
@ujfalusi
Copy link
Collaborator Author

Changes since v1:

  • use 'skip_imr_boot' in debugfs
  • handle mtl and lnl

When IMR boot is supported on a platform it is always going to be used to
boot the DSP unless some catastrophic event happens.
There is no way for a developer to force a clean DSP boot without removing
and re-inserting the modules.

Create a 'skip_imr_boot' debugfs file which can be used to force the
next DSP boot as clean (prune) boot.

Signed-off-by: Peter Ujfalusi <[email protected]>
@plbossart plbossart merged commit 178aad3 into thesofproject:topic/sof-dev Dec 18, 2023
9 checks passed
@ujfalusi ujfalusi deleted the peter/sof/pr/hda_force_prune_boot_01 branch December 13, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants