aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-09-19 18:22:11 +0100
committerMark Brown <broonie@kernel.org>2023-09-19 18:22:11 +0100
commit03db12ef1cbc3ad86aaaf3a5e9203a936dba52b8 (patch)
tree3cfbde5f60fc2e9fcf259f59bae838333c3ca71b /include/sound
parent16bb22098f0a44fed8192c4b16fede95876fdc19 (diff)
parentc1c48fd6bbe788458e3685fea74bdb3cb148ff93 (diff)
downloadlinux-03db12ef1cbc3ad86aaaf3a5e9203a936dba52b8.tar.gz
ASoC: SOF: ipc4/Intel: Support for firmware exception
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: When a firmware crashes it creats a panic information into a telemetry slot. The panic format is defined by Zephyr, includes stack and additional information to help to identify the reason for the crash. Part of the firmware exception handling the firmware also sends an EXCEPTION_CAUGHT notification. This series implements the kernel side handling of the exception: print information into the kernel log export the whole telemetry slot to user space for tools extract additional information from the panic dump.
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/sof/ipc4/header.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sound/sof/ipc4/header.h b/include/sound/sof/ipc4/header.h
index c58f00ef054a7..574a9d581f889 100644
--- a/include/sound/sof/ipc4/header.h
+++ b/include/sound/sof/ipc4/header.h
@@ -515,6 +515,23 @@ struct sof_ipc4_notify_resource_data {
uint32_t data[6];
} __packed __aligned(4);
+#define SOF_IPC4_DEBUG_DESCRIPTOR_SIZE 12 /* 3 x u32 */
+
+/*
+ * The debug memory window is divided into 16 slots, and the
+ * first slot is used as a recorder for the other 15 slots.
+ */
+#define SOF_IPC4_MAX_DEBUG_SLOTS 15
+#define SOF_IPC4_DEBUG_SLOT_SIZE 0x1000
+
+/* debug log slot types */
+#define SOF_IPC4_DEBUG_SLOT_UNUSED 0x00000000
+#define SOF_IPC4_DEBUG_SLOT_CRITICAL_LOG 0x54524300 /* byte 0: core ID */
+#define SOF_IPC4_DEBUG_SLOT_DEBUG_LOG 0x474f4c00 /* byte 0: core ID */
+#define SOF_IPC4_DEBUG_SLOT_GDB_STUB 0x42444700
+#define SOF_IPC4_DEBUG_SLOT_TELEMETRY 0x4c455400
+#define SOF_IPC4_DEBUG_SLOT_BROKEN 0x44414544
+
/** @}*/
#endif