1
2
3
4
5
6
7
8
9 #ifndef __INCLUDE_SOUND_SOF_TRACE_H__
10 #define __INCLUDE_SOUND_SOF_TRACE_H__
11
12 #include <sound/sof/header.h>
13 #include <sound/sof/stream.h>
14
15
16
17
18
19 #define SOF_TRACE_FILENAME_SIZE 32
20
21
22
23 struct sof_ipc_dma_trace_params {
24 struct sof_ipc_cmd_hdr hdr;
25 struct sof_ipc_host_buffer buffer;
26 uint32_t stream_tag;
27 } __packed;
28
29
30 struct sof_ipc_dma_trace_params_ext {
31 struct sof_ipc_cmd_hdr hdr;
32 struct sof_ipc_host_buffer buffer;
33 uint32_t stream_tag;
34 uint64_t timestamp_ns;
35 uint32_t reserved[8];
36 } __packed;
37
38
39 struct sof_ipc_dma_trace_posn {
40 struct sof_ipc_reply rhdr;
41 uint32_t host_offset;
42 uint32_t overflow;
43 uint32_t messages;
44 } __packed;
45
46
47
48
49
50
51
52
53 #define SOF_IPC_PANIC_MAGIC 0x0dead000
54 #define SOF_IPC_PANIC_MAGIC_MASK 0x0ffff000
55 #define SOF_IPC_PANIC_CODE_MASK 0x00000fff
56 #define SOF_IPC_PANIC_MEM (SOF_IPC_PANIC_MAGIC | 0x0)
57 #define SOF_IPC_PANIC_WORK (SOF_IPC_PANIC_MAGIC | 0x1)
58 #define SOF_IPC_PANIC_IPC (SOF_IPC_PANIC_MAGIC | 0x2)
59 #define SOF_IPC_PANIC_ARCH (SOF_IPC_PANIC_MAGIC | 0x3)
60 #define SOF_IPC_PANIC_PLATFORM (SOF_IPC_PANIC_MAGIC | 0x4)
61 #define SOF_IPC_PANIC_TASK (SOF_IPC_PANIC_MAGIC | 0x5)
62 #define SOF_IPC_PANIC_EXCEPTION (SOF_IPC_PANIC_MAGIC | 0x6)
63 #define SOF_IPC_PANIC_DEADLOCK (SOF_IPC_PANIC_MAGIC | 0x7)
64 #define SOF_IPC_PANIC_STACK (SOF_IPC_PANIC_MAGIC | 0x8)
65 #define SOF_IPC_PANIC_IDLE (SOF_IPC_PANIC_MAGIC | 0x9)
66 #define SOF_IPC_PANIC_WFI (SOF_IPC_PANIC_MAGIC | 0xa)
67 #define SOF_IPC_PANIC_ASSERT (SOF_IPC_PANIC_MAGIC | 0xb)
68
69
70
71
72 struct sof_ipc_panic_info {
73 struct sof_ipc_hdr hdr;
74 uint32_t code;
75 char filename[SOF_TRACE_FILENAME_SIZE];
76 uint32_t linenum;
77 } __packed;
78
79 #endif