From 5432c28bf417e7020ba2844f12cabf679bcf40f5 Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Thu, 1 Jun 2023 15:24:16 +0800 Subject: [PATCH 1/3] zephyr: wrapper: halt the system in fatal error handler Follow the k_sys_fatal_error_handler implementation in fatal.c in zephyr framework. Without this halt, our k_sys_fatal_error_handler will be called copules time and result to many useless IPC messages to host. Signed-off-by: Rander Wang --- zephyr/wrapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index 2b6102a0de04..83535adc0572 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -336,4 +336,5 @@ void k_sys_fatal_error_handler(unsigned int reason, ipc_send_panic_notification(); LOG_ERR("Halting system"); + k_fatal_halt(reason); } From 28a09dcfb23239ffa8004a92a6f82609c4efb12a Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Thu, 1 Jun 2023 17:21:26 +0800 Subject: [PATCH 2/3] zephyr: enable core dump on tgl platforms We need to enable CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN according to comments in coredump_core.c: When dumping minimum information, the current thread struct and stack need to be dumped so debugger can examine them. Signed-off-by: Rander Wang --- app/boards/intel_adsp_cavs25.conf | 4 ++++ app/boards/intel_adsp_cavs25_tgph.conf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/boards/intel_adsp_cavs25.conf b/app/boards/intel_adsp_cavs25.conf index 12a47090c4cc..4033a6fb8e93 100644 --- a/app/boards/intel_adsp_cavs25.conf +++ b/app/boards/intel_adsp_cavs25.conf @@ -8,3 +8,7 @@ CONFIG_INTEL_ALH=y CONFIG_LP_MEMORY_BANKS=1 CONFIG_HP_MEMORY_BANKS=30 CONFIG_RIMAGE_SIGNING_SCHEMA="tgl" + +CONFIG_DEBUG_COREDUMP=y +CONFIG_DEBUG_COREDUMP_BACKEND_INTEL_ADSP_MEM_WINDOW=y +CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y diff --git a/app/boards/intel_adsp_cavs25_tgph.conf b/app/boards/intel_adsp_cavs25_tgph.conf index 0aaac87a6496..75fe4cae8bf3 100644 --- a/app/boards/intel_adsp_cavs25_tgph.conf +++ b/app/boards/intel_adsp_cavs25_tgph.conf @@ -7,3 +7,7 @@ CONFIG_INTEL_ALH=y CONFIG_LP_MEMORY_BANKS=1 CONFIG_HP_MEMORY_BANKS=30 CONFIG_RIMAGE_SIGNING_SCHEMA="tgl-h" + +CONFIG_DEBUG_COREDUMP=y +CONFIG_DEBUG_COREDUMP_BACKEND_INTEL_ADSP_MEM_WINDOW=y +CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y From d54d921069453873656488ad56b6d3f0f47295e3 Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Thu, 1 Jun 2023 17:22:31 +0800 Subject: [PATCH 3/3] zephyr: enable core dump on MTL platform Follow the setting on TGL platforms. Signed-off-by: Rander Wang --- app/boards/intel_adsp_ace15_mtpm.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/boards/intel_adsp_ace15_mtpm.conf b/app/boards/intel_adsp_ace15_mtpm.conf index 2fd25da7db9f..c519289aa706 100644 --- a/app/boards/intel_adsp_ace15_mtpm.conf +++ b/app/boards/intel_adsp_ace15_mtpm.conf @@ -77,3 +77,7 @@ CONFIG_COMP_KPB=y CONFIG_COMP_ARIA=y CONFIG_CLOCK_CONTROL_ADSP=y CONFIG_CLOCK_CONTROL=y + +CONFIG_DEBUG_COREDUMP=y +CONFIG_DEBUG_COREDUMP_BACKEND_INTEL_ADSP_MEM_WINDOW=y +CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y