Commit 5224f8b
committed
library_manager: Guard DRAM store/restore with CONFIG_ADSP_IMR_CONTEXT_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>1 parent 3347ddc commit 5224f8b
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| |||
161 | 170 | | |
162 | 171 | | |
163 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
164 | 182 | | |
165 | 183 | | |
166 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
842 | 846 | | |
843 | 847 | | |
844 | 848 | | |
| |||
0 commit comments