library_manager: Guard DRAM store/restore with CONFIG_ADSP_IMR_CONTEX…#11019
Open
lgirdwood wants to merge 1 commit into
Open
library_manager: Guard DRAM store/restore with CONFIG_ADSP_IMR_CONTEX…#11019lgirdwood wants to merge 1 commit into
lgirdwood wants to merge 1 commit into
Conversation
…T_SAVE When ADSP IMR context save is disabled (CONFIG_ADSP_IMR_CONTEXT_SAVE=n), the HP-SRAM and L3 heap memory are lost during PM runtime suspend/resume. However, the LLEXT library manager state `lib_manager_dram` resides in the persistent IMR data section (`__imrdata`) and retains stale pointers (such as `lib_manager_dram.ctx` pointing to the now-invalid L3 heap address from the first boot). On resume, `llext_manager_restore_from_dram()` would try to restore libraries from these stale pointers, causing register window underflows and fatal exceptions (EXCCAUSE_ILLEGAL) when executing scheduler work queues on subsequent IPC handling. Guard `llext_manager_store_to_dram()` and `llext_manager_restore_from_dram()` with `IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE)`. If context save is disabled, the library manager cleanly re-initializes on resume boot, forcing libraries to reload correctly. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
requested review from
dabekjakub,
dbaluta,
kv2019i,
lbetlej,
mmaka1 and
plbossart
as code owners
July 21, 2026 12:42
Member
Author
|
@lyakh found via breadcrumbs. Not sure if you've seen or are aware of similar during userspace work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…T_SAVE
When ADSP IMR context save is disabled (CONFIG_ADSP_IMR_CONTEXT_SAVE=n), the HP-SRAM and L3 heap memory are lost during PM runtime suspend/resume. However, the LLEXT library manager state
lib_manager_dramresides in the persistent IMR data section (__imrdata) and retains stale pointers (such aslib_manager_dram.ctxpointing to the now-invalid L3 heap address from the first boot).On resume,
llext_manager_restore_from_dram()would try to restore libraries from these stale pointers, causing register window underflows and fatal exceptions (EXCCAUSE_ILLEGAL) when executing scheduler work queues on subsequent IPC handling.Guard
llext_manager_store_to_dram()andllext_manager_restore_from_dram()withIS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE). If context save is disabled, the library manager cleanly re-initializes on resume boot, forcing libraries to reload correctly.