lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #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
|
| 7 | extern unsigned long ZCAT_PS_2_PHY_BUFFER_BASE;
|
| 8 | extern 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 |
|
| 25 | typedef 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.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame] | 36 | #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))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 38 |
|
xf.li | 9d1a0e1 | 2023-09-20 01:43:20 -0700 | [diff] [blame^] | 39 | ////zCat Log Rule
|
| 40 | #define ZCAT_RULE_LTE_ENABLED (ZCAT_PHY_LOG_VEHICLE_SIGN + (4>>CPU_SHIFT))
|
| 41 | #define ZCAT_RULE_SIG_ENABLED (ZCAT_RULE_LTE_ENABLED + (4>>CPU_SHIFT))
|
| 42 | #define ZCAT_RULE_TD_ENABLED (ZCAT_RULE_SIG_ENABLED + (4>>CPU_SHIFT))
|
| 43 | #define ZCAT_RULE_WCDMA_ENABLED (ZCAT_RULE_TD_ENABLED + (4>>CPU_SHIFT))
|
| 44 | #define ZCAT_RULE_AP2APP_ENABLED (ZCAT_RULE_WCDMA_ENABLED + (4>>CPU_SHIFT))
|
| 45 | #define ZCAT_RULE_AP2KERNEL_ENABLED (ZCAT_RULE_AP2APP_ENABLED + (4>>CPU_SHIFT))
|
| 46 |
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 47 | ////PHY<->PS ringbuffer(TD)
|
| 48 | #define ZCAT_PHY_LOG_CONTROL_SIZE (0x200UL>>CPU_SHIFT)
|
| 49 | #define ZCAT_PHY_LOG_CONTROL_LEN (ZCAT_PHY_LOG_CONTROL_SIZE - (4 >> CPU_SHIFT))
|
| 50 |
|
| 51 | #define ZCAT_TD_LOG_CONTROL_BASE_ADDR (ZCAT_PS_2_PHY_BUFFER_BASE)
|
| 52 | #define ZCAT_TD_LOG_CONTROL_WPOINTER (ZCAT_TD_LOG_CONTROL_BASE_ADDR)
|
| 53 | #define ZCAT_TD_LOG_CONTROL_RPOINTER (ZCAT_TD_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
|
| 54 | #define ZCAT_TD_LOG_CONTROL_CONTENT (ZCAT_TD_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
|
| 55 |
|
| 56 | ////PHY<->PS ringbuffer(LTE)
|
| 57 | #define ZCAT_LTE_LOG_CONTROL_BASE_ADDR (ZCAT_TD_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
|
| 58 | #define ZCAT_LTE_LOG_CONTROL_WPOINTER (ZCAT_LTE_LOG_CONTROL_BASE_ADDR)
|
| 59 | #define ZCAT_LTE_LOG_CONTROL_RPOINTER (ZCAT_LTE_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
|
| 60 | #define ZCAT_LTE_LOG_CONTROL_CONTENT (ZCAT_LTE_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
|
| 61 |
|
| 62 | ////PHY<->PS ringbuffer(W)
|
| 63 | #define ZCAT_W_LOG_CONTROL_BASE_ADDR (ZCAT_LTE_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
|
| 64 | #define ZCAT_W_LOG_CONTROL_WPOINTER (ZCAT_W_LOG_CONTROL_BASE_ADDR)
|
| 65 | #define ZCAT_W_LOG_CONTROL_RPOINTER (ZCAT_W_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
|
| 66 | #define ZCAT_W_LOG_CONTROL_CONTENT (ZCAT_W_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
|
| 67 |
|
| 68 | ////PHY<->PS ringbuffer(SIG)
|
| 69 | #define ZCAT_SIG_LOG_CONTROL_BASE_ADDR (ZCAT_W_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
|
| 70 | #define ZCAT_SIG_LOG_CONTROL_WPOINTER (ZCAT_SIG_LOG_CONTROL_BASE_ADDR)
|
| 71 | #define ZCAT_SIG_LOG_CONTROL_RPOINTER (ZCAT_SIG_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
|
| 72 | #define ZCAT_SIG_LOG_CONTROL_CONTENT (ZCAT_SIG_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
|
| 73 |
|
| 74 | ////ZCAT-TD
|
| 75 | #define ZCAT_TD_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_SIG_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
|
| 76 | #define ZCAT_TD_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
|
| 77 |
|
| 78 | ////ZCAT-LTE
|
| 79 | #define ZCAT_LTE_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_TD_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_TD_PS_TO_PHY_BUFFER_SIZE)
|
| 80 | #define ZCAT_LTE_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
|
| 81 |
|
| 82 | ////ZCAT-WCDMA
|
| 83 | #define ZCAT_W_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_LTE_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_LTE_PS_TO_PHY_BUFFER_SIZE)
|
| 84 | #define ZCAT_W_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
|
| 85 |
|
| 86 | ////ZCAT-SIG
|
| 87 | #define ZCAT_SIG_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_W_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_W_PS_TO_PHY_BUFFER_SIZE)
|
| 88 | #define ZCAT_SIG_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
|
| 89 |
|
| 90 | #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 + \
|
| 91 | 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)
|
| 92 | #endif
|
| 93 |
|