blob: 343e77b7ad6e508860aca6e86f10cd5afdbad8e0 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#ifndef ZSPTRACE_H_
2#define ZSPTRACE_H_
3
4#define ZCAT_ZPS_BUFFER_SIZE (0x00010000UL>>CPU_SHIFT)
5
6#ifndef DDR_BASE_ADDR_TOOL_ICP
7extern unsigned long ZCAT_PS_2_PHY_BUFFER_BASE;
8extern unsigned long ZCAT_PHY_2_PS_BUFFER_BASE;
9#endif
10
11////PHY-ZCAT
12#define ZCAT_PHY_2_PS_BUFFER_SIZE (0x00060000UL>>CPU_SHIFT)
13#define ZCAT_PHY_LOG_UNIT_ORDER (14 - CPU_SHIFT) /* 16KB */
14#define ZCAT_PHY_LOG_UNIT_SIZE (1UL<<ZCAT_PHY_LOG_UNIT_ORDER)
15#define ZCAT_PHY_LOG_UNIT_NUM (ZCAT_PHY_2_PS_BUFFER_SIZE >> ZCAT_PHY_LOG_UNIT_ORDER)
16
17#define ZCAT_PHY_STD_LOG_OFFSET (28UL>>CPU_SHIFT) /* sizeof(T_COMM_TYPE + T_ZCAT_HEADER) */
18#define ZCAT_PHY_PRT_LOG_OFFSET (40UL>>CPU_SHIFT) /* sizeof(T_COMM_TYPE + T_ZCAT_HEADER + T_ZCAT_DBG_HEADER) */
19
20#define LOG_TD (1)
21#define LOG_LTE (2)
22#define LOG_W (3)
23#define LOG_SIG (4)
24
25typedef struct
26{
27 unsigned long type;
28 unsigned long len;
29} T_ZCAT_Phy_Log_Unit_Header;
30
31#define ZCAT_PHY_LOG_UNIT_HEAD (IRAM_BASE_ADDR_ZCAT_PHY_LOG)
32#define ZCAT_PHY_LOG_UNIT_TAIL (ZCAT_PHY_LOG_UNIT_HEAD + (4>>CPU_SHIFT))
33#define ZCAT_PHY_LOG_Free_UNIT_BUF (ZCAT_PHY_LOG_UNIT_TAIL + (4>>CPU_SHIFT))
34#define ZCAT_PHY_LOG_Free_UNIT_LEN (96>>CPU_SHIFT) /* (24 * 4)B = 384K*/
35#define ZCAT_PHY_LOG_OFF (ZCAT_PHY_LOG_UNIT_HEAD + (16>>CPU_SHIFT) + ZCAT_PHY_LOG_Free_UNIT_LEN) /* ¶àÔ¤ÁôÁË8×Ö½Ú */
xf.li742dd022023-06-08 01:43:32 -070036#define ZCAT_PHY_LOG_ZSP_BUF_READY (ZCAT_PHY_LOG_OFF + (4>>CPU_SHIFT))
37#define ZCAT_PHY_LOG_VEHICLE_SIGN (ZCAT_PHY_LOG_ZSP_BUF_READY + (4>>CPU_SHIFT))
lh9ed821d2023-04-07 01:36:19 -070038
xf.lice873192023-11-08 17:10:35 -080039/*ά²âÐÅÏ¢Log¿ª¹Ø*/
40#define ZCAT_DEBUG_INFO_DISABLE (ZCAT_PHY_LOG_VEHICLE_SIGN + (4>>CPU_SHIFT))
41
xf.li9d1a0e12023-09-20 01:43:20 -070042////zCat Log Rule
xf.lice873192023-11-08 17:10:35 -080043#define ZCAT_RULE_LTE_ENABLED (ZCAT_DEBUG_INFO_DISABLE + (4>>CPU_SHIFT))
xf.li9d1a0e12023-09-20 01:43:20 -070044#define ZCAT_RULE_SIG_ENABLED (ZCAT_RULE_LTE_ENABLED + (4>>CPU_SHIFT))
45#define ZCAT_RULE_TD_ENABLED (ZCAT_RULE_SIG_ENABLED + (4>>CPU_SHIFT))
46#define ZCAT_RULE_WCDMA_ENABLED (ZCAT_RULE_TD_ENABLED + (4>>CPU_SHIFT))
47#define ZCAT_RULE_AP2APP_ENABLED (ZCAT_RULE_WCDMA_ENABLED + (4>>CPU_SHIFT))
48#define ZCAT_RULE_AP2KERNEL_ENABLED (ZCAT_RULE_AP2APP_ENABLED + (4>>CPU_SHIFT))
49
lh9ed821d2023-04-07 01:36:19 -070050////PHY<->PS ringbuffer(TD)
51#define ZCAT_PHY_LOG_CONTROL_SIZE (0x200UL>>CPU_SHIFT)
52#define ZCAT_PHY_LOG_CONTROL_LEN (ZCAT_PHY_LOG_CONTROL_SIZE - (4 >> CPU_SHIFT))
53
54#define ZCAT_TD_LOG_CONTROL_BASE_ADDR (ZCAT_PS_2_PHY_BUFFER_BASE)
55#define ZCAT_TD_LOG_CONTROL_WPOINTER (ZCAT_TD_LOG_CONTROL_BASE_ADDR)
56#define ZCAT_TD_LOG_CONTROL_RPOINTER (ZCAT_TD_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
57#define ZCAT_TD_LOG_CONTROL_CONTENT (ZCAT_TD_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
58
59////PHY<->PS ringbuffer(LTE)
60#define ZCAT_LTE_LOG_CONTROL_BASE_ADDR (ZCAT_TD_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
61#define ZCAT_LTE_LOG_CONTROL_WPOINTER (ZCAT_LTE_LOG_CONTROL_BASE_ADDR)
62#define ZCAT_LTE_LOG_CONTROL_RPOINTER (ZCAT_LTE_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
63#define ZCAT_LTE_LOG_CONTROL_CONTENT (ZCAT_LTE_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
64
65////PHY<->PS ringbuffer(W)
66#define ZCAT_W_LOG_CONTROL_BASE_ADDR (ZCAT_LTE_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
67#define ZCAT_W_LOG_CONTROL_WPOINTER (ZCAT_W_LOG_CONTROL_BASE_ADDR)
68#define ZCAT_W_LOG_CONTROL_RPOINTER (ZCAT_W_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
69#define ZCAT_W_LOG_CONTROL_CONTENT (ZCAT_W_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
70
71////PHY<->PS ringbuffer(SIG)
72#define ZCAT_SIG_LOG_CONTROL_BASE_ADDR (ZCAT_W_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
73#define ZCAT_SIG_LOG_CONTROL_WPOINTER (ZCAT_SIG_LOG_CONTROL_BASE_ADDR)
74#define ZCAT_SIG_LOG_CONTROL_RPOINTER (ZCAT_SIG_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
75#define ZCAT_SIG_LOG_CONTROL_CONTENT (ZCAT_SIG_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
76
77////ZCAT-TD
78#define ZCAT_TD_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_SIG_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
79#define ZCAT_TD_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
80
81////ZCAT-LTE
82#define ZCAT_LTE_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_TD_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_TD_PS_TO_PHY_BUFFER_SIZE)
83#define ZCAT_LTE_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
84
85////ZCAT-WCDMA
86#define ZCAT_W_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_LTE_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_LTE_PS_TO_PHY_BUFFER_SIZE)
87#define ZCAT_W_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
88
89////ZCAT-SIG
90#define ZCAT_SIG_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_W_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_W_PS_TO_PHY_BUFFER_SIZE)
91#define ZCAT_SIG_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
92
93#define ZCAT_PS_2_PHY_BUFFER_SIZE (ZCAT_PHY_LOG_CONTROL_SIZE + ZCAT_PHY_LOG_CONTROL_SIZE + ZCAT_PHY_LOG_CONTROL_SIZE + ZCAT_PHY_LOG_CONTROL_SIZE + \
94 ZCAT_TD_PS_TO_PHY_BUFFER_SIZE + ZCAT_LTE_PS_TO_PHY_BUFFER_SIZE + ZCAT_W_PS_TO_PHY_BUFFER_SIZE + ZCAT_SIG_PS_TO_PHY_BUFFER_SIZE)
95#endif
96