1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
6 * Copyright(c) 2023 Intel Corporation
9 #ifndef __SOUND_SOC_SOF_IPC4_TELEMETRY_H
10 #define __SOUND_SOC_SOF_IPC4_TELEMETRY_H
13 enum sof_ipc4_coredump_tgt_code
{
14 COREDUMP_TGT_UNKNOWN
= 0,
17 COREDUMP_TGT_ARM_CORTEX_M
,
22 #define COREDUMP_ARCH_HDR_ID 'A'
23 #define COREDUMP_HDR_ID0 'Z'
24 #define COREDUMP_HDR_ID1 'E'
26 #define XTENSA_BLOCK_HDR_VER 2
27 #define XTENSA_CORE_DUMP_SEPARATOR 0x0DEC0DEB
28 #define XTENSA_CORE_AR_REGS_COUNT 16
29 #define XTENSA_SOC_INTEL_ADSP 3
30 #define XTENSA_TOOL_CHAIN_ZEPHYR 1
31 #define XTENSA_TOOL_CHAIN_XCC 2
34 struct sof_ipc4_coredump_hdr
{
35 /* 'Z', 'E' as identifier of file */
38 /* Identify the version of the header */
41 /* Indicate which target (e.g. architecture or SoC) */
44 /* Size of uintptr_t in power of 2. (e.g. 5 for 32-bit, 6 for 64-bit) */
49 /* Reason for the fatal error */
53 /* Architecture-specific block header */
54 struct sof_ipc4_coredump_arch_hdr
{
55 /* COREDUMP_ARCH_HDR_ID to indicate this is a architecture-specific block */
58 /* Identify the version of this block */
61 /* Number of bytes following the header */
65 struct sof_ipc4_telemetry_slot_data
{
67 struct sof_ipc4_coredump_hdr hdr
;
68 struct sof_ipc4_coredump_arch_hdr arch_hdr
;
72 void sof_ipc4_create_exception_debugfs_node(struct snd_sof_dev
*sdev
);