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

[v2.7] Disable IMR context save for MTL [alternative comment wording] #8170

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/boards/intel_adsp_ace15_mtpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CONFIG_PM_POLICY_CUSTOM=y
CONFIG_POWER_DOMAIN=y
CONFIG_POWER_DOMAIN_INTEL_ADSP=y

CONFIG_ADSP_IMR_CONTEXT_SAVE=y
CONFIG_ADSP_IMR_CONTEXT_SAVE=n

# enable Zephyr drivers
CONFIG_ZEPHYR_NATIVE_DRIVERS=y
Expand Down
14 changes: 9 additions & 5 deletions zephyr/lib/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,16 @@ int cpu_enable_core(int id)
return 0;

#if ZEPHYR_VERSION(3, 0, 99) <= ZEPHYR_VERSION_CODE
/* During kernel initialization, the next pm state is set to ACTIVE. By checking this
* value, we determine if this is the first core boot, if not, we need to skip idle thread
* initialization. By reinitializing the idle thread, we would overwrite the kernel structs
* and the idle thread stack.
/* Intel ACE platform has implemented runtime-idle based
* management of secondary cores. On these systems,
* z_init_cpu() must be only run when pm_state_next_get()
* returns PM_STATE_ACTIVE, or otherwise the kernel structs
* and idle thread stack get overwritten.
*
* On other SOF platforms with Zephyr support, z_init_cpu()
* must be always run at cpu_enable_core().
*/
if (!IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE) ||
if (!IS_ENABLED(CONFIG_ACE) ||
pm_state_next_get(id)->state == PM_STATE_ACTIVE)
z_init_cpu(id);
#endif
Expand Down
Loading