Skip to content

Commit f27d605

Browse files
tmlemanabonislawski
authored andcommitted
lib: cpu: Check return value from platform_boot_complete
Add error handling for platform_boot_complete() during D3 exit to improve debugging capabilities. Previously, platform_boot_complete() could fail silently if the DSP entered D3 state with an invalid IPC driver state, making it difficult to identify the root cause of issues. This change captures the return value and triggers a panic with a clear error message when the function fails. This improvement makes debugging easier by explicitly indicating when the boot completion fails after resuming from D3, rather than allowing execution to continue with potential undefined behavior. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent 9ed5472 commit f27d605

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

zephyr/lib/cpu.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,12 @@ void cpu_notify_state_exit(enum pm_state state)
211211
global_imr_ram_storage = NULL;
212212

213213
/* send FW Ready message */
214-
platform_boot_complete(0);
214+
int ret = platform_boot_complete(0);
215+
216+
if (ret) {
217+
tr_err(&zephyr_tr, "platform_boot_complete failed: %d", ret);
218+
k_panic();
219+
}
215220
#endif
216221
}
217222
}

0 commit comments

Comments
 (0)