0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef __INCLUDE_SOUND_SOF_TRACE_H__
0010 #define __INCLUDE_SOUND_SOF_TRACE_H__
0011
0012 #include <sound/sof/header.h>
0013 #include <sound/sof/stream.h>
0014
0015
0016
0017
0018
0019 #define SOF_TRACE_FILENAME_SIZE 32
0020
0021
0022
0023 struct sof_ipc_dma_trace_params {
0024 struct sof_ipc_cmd_hdr hdr;
0025 struct sof_ipc_host_buffer buffer;
0026 uint32_t stream_tag;
0027 } __packed;
0028
0029
0030 struct sof_ipc_dma_trace_params_ext {
0031 struct sof_ipc_cmd_hdr hdr;
0032 struct sof_ipc_host_buffer buffer;
0033 uint32_t stream_tag;
0034 uint64_t timestamp_ns;
0035 uint32_t reserved[8];
0036 } __packed;
0037
0038
0039 struct sof_ipc_dma_trace_posn {
0040 struct sof_ipc_reply rhdr;
0041 uint32_t host_offset;
0042 uint32_t overflow;
0043 uint32_t messages;
0044 } __packed;
0045
0046
0047
0048
0049 #define SOF_IPC_TRACE_FILTER_ELEM_SET_LEVEL 0x01
0050 #define SOF_IPC_TRACE_FILTER_ELEM_BY_UUID 0x02
0051 #define SOF_IPC_TRACE_FILTER_ELEM_BY_PIPE 0x03
0052 #define SOF_IPC_TRACE_FILTER_ELEM_BY_COMP 0x04
0053
0054
0055 #define SOF_IPC_TRACE_FILTER_ELEM_FIN 0x80
0056
0057
0058
0059
0060 struct sof_ipc_trace_filter_elem {
0061 uint32_t key;
0062 uint32_t value;
0063 } __packed;
0064
0065
0066 struct sof_ipc_trace_filter {
0067 struct sof_ipc_cmd_hdr hdr;
0068 uint32_t elem_cnt;
0069 uint32_t reserved[8];
0070
0071 struct sof_ipc_trace_filter_elem elems[];
0072 } __packed;
0073
0074
0075
0076
0077
0078
0079
0080
0081 #define SOF_IPC_PANIC_MAGIC 0x0dead000
0082 #define SOF_IPC_PANIC_MAGIC_MASK 0x0ffff000
0083 #define SOF_IPC_PANIC_CODE_MASK 0x00000fff
0084 #define SOF_IPC_PANIC_MEM (SOF_IPC_PANIC_MAGIC | 0x0)
0085 #define SOF_IPC_PANIC_WORK (SOF_IPC_PANIC_MAGIC | 0x1)
0086 #define SOF_IPC_PANIC_IPC (SOF_IPC_PANIC_MAGIC | 0x2)
0087 #define SOF_IPC_PANIC_ARCH (SOF_IPC_PANIC_MAGIC | 0x3)
0088 #define SOF_IPC_PANIC_PLATFORM (SOF_IPC_PANIC_MAGIC | 0x4)
0089 #define SOF_IPC_PANIC_TASK (SOF_IPC_PANIC_MAGIC | 0x5)
0090 #define SOF_IPC_PANIC_EXCEPTION (SOF_IPC_PANIC_MAGIC | 0x6)
0091 #define SOF_IPC_PANIC_DEADLOCK (SOF_IPC_PANIC_MAGIC | 0x7)
0092 #define SOF_IPC_PANIC_STACK (SOF_IPC_PANIC_MAGIC | 0x8)
0093 #define SOF_IPC_PANIC_IDLE (SOF_IPC_PANIC_MAGIC | 0x9)
0094 #define SOF_IPC_PANIC_WFI (SOF_IPC_PANIC_MAGIC | 0xa)
0095 #define SOF_IPC_PANIC_ASSERT (SOF_IPC_PANIC_MAGIC | 0xb)
0096
0097
0098
0099
0100 struct sof_ipc_panic_info {
0101 struct sof_ipc_hdr hdr;
0102 uint32_t code;
0103 uint8_t filename[SOF_TRACE_FILENAME_SIZE];
0104 uint32_t linenum;
0105 } __packed;
0106
0107 #endif