yuezonghe | 824eb0c | 2024-06-27 02:32:26 -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 (0x00040000UL>>CPU_SHIFT)
|
| 13 |
|
| 14 | #define ZCAT_PHY_LOG_BASE_ADDR (ZCAT_PHY_2_PS_BUFFER_BASE)
|
| 15 | #define ZCAT_PHY_LOG_UNIT_ORDER (14 - CPU_SHIFT) /* 16KB */
|
| 16 | #define ZCAT_PHY_LOG_UNIT_SIZE (1UL<<ZCAT_PHY_LOG_UNIT_ORDER)
|
| 17 | #define ZCAT_PHY_LOG_UNIT_NUM (ZCAT_PHY_2_PS_BUFFER_SIZE >> ZCAT_PHY_LOG_UNIT_ORDER)
|
| 18 | #define ZCAT_PHY_LOG_UNIT_INDEX(addr) (((unsigned long)addr - ZCAT_PHY_LOG_BASE_ADDR) >> ZCAT_PHY_LOG_UNIT_ORDER)
|
| 19 | #define ZCAT_PHY_LOG_UNIT_HEADER(index) ((T_ZCAT_Phy_Log_Unit_Header *)(ZCAT_PHY_LOG_BASE_ADDR + ((unsigned long)index << ZCAT_PHY_LOG_UNIT_ORDER)))
|
| 20 |
|
| 21 | #define ZCAT_PHY_STD_LOG_OFFSET (28UL>>CPU_SHIFT) /* sizeof(T_COMM_TYPE + T_ZCAT_HEADER) */
|
| 22 | #define ZCAT_PHY_PRT_LOG_OFFSET (40UL>>CPU_SHIFT) /* sizeof(T_COMM_TYPE + T_ZCAT_HEADER + T_ZCAT_DBG_HEADER) */
|
| 23 |
|
| 24 | #define LOG_TD (1)
|
| 25 | #define LOG_LTE (2)
|
| 26 | #define LOG_W (3)
|
| 27 | #define LOG_SIG (4)
|
| 28 |
|
| 29 | typedef struct
|
| 30 | {
|
| 31 | unsigned long type;
|
| 32 | unsigned long len;
|
| 33 | } T_ZCAT_Phy_Log_Unit_Header;
|
| 34 |
|
| 35 | #define ZCAT_PHY_LOG_UNIT_HEAD (IRAM_BASE_ADDR_ZCAT_PHY_LOG)
|
| 36 | #define ZCAT_PHY_LOG_UNIT_TAIL (ZCAT_PHY_LOG_UNIT_HEAD + (4>>CPU_SHIFT))
|
| 37 | #define ZCAT_PHY_LOG_Free_UNIT_BUF (ZCAT_PHY_LOG_UNIT_TAIL + (4>>CPU_SHIFT))
|
| 38 | #define ZCAT_PHY_LOG_Free_UNIT_LEN (64>>CPU_SHIFT) /* (16 * 4)B */
|
| 39 |
|
| 40 | #define ZCAT_PHY_LOG_OFF (ZCAT_PHY_LOG_UNIT_HEAD + (16>>CPU_SHIFT) + ZCAT_PHY_LOG_Free_UNIT_LEN) /* ¶àÔ¤ÁôÁË8×Ö½Ú */
|
| 41 |
|
| 42 | ////PHY<->PS ringbuffer(TD)
|
| 43 | #define ZCAT_PHY_LOG_CONTROL_SIZE (0x200UL>>CPU_SHIFT)
|
| 44 | #define ZCAT_PHY_LOG_CONTROL_LEN (ZCAT_PHY_LOG_CONTROL_SIZE - (4 >> CPU_SHIFT))
|
| 45 |
|
| 46 | #define ZCAT_TD_LOG_CONTROL_BASE_ADDR (ZCAT_PS_2_PHY_BUFFER_BASE)
|
| 47 | #define ZCAT_TD_LOG_CONTROL_WPOINTER (ZCAT_TD_LOG_CONTROL_BASE_ADDR)
|
| 48 | #define ZCAT_TD_LOG_CONTROL_RPOINTER (ZCAT_TD_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
|
| 49 | #define ZCAT_TD_LOG_CONTROL_CONTENT (ZCAT_TD_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
|
| 50 |
|
| 51 | ////PHY<->PS ringbuffer(LTE)
|
| 52 | #define ZCAT_LTE_LOG_CONTROL_BASE_ADDR (ZCAT_TD_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
|
| 53 | #define ZCAT_LTE_LOG_CONTROL_WPOINTER (ZCAT_LTE_LOG_CONTROL_BASE_ADDR)
|
| 54 | #define ZCAT_LTE_LOG_CONTROL_RPOINTER (ZCAT_LTE_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
|
| 55 | #define ZCAT_LTE_LOG_CONTROL_CONTENT (ZCAT_LTE_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
|
| 56 |
|
| 57 | ////PHY<->PS ringbuffer(W)
|
| 58 | #define ZCAT_W_LOG_CONTROL_BASE_ADDR (ZCAT_LTE_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
|
| 59 | #define ZCAT_W_LOG_CONTROL_WPOINTER (ZCAT_W_LOG_CONTROL_BASE_ADDR)
|
| 60 | #define ZCAT_W_LOG_CONTROL_RPOINTER (ZCAT_W_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
|
| 61 | #define ZCAT_W_LOG_CONTROL_CONTENT (ZCAT_W_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
|
| 62 |
|
| 63 | ////PHY<->PS ringbuffer(SIG)
|
| 64 | #define ZCAT_SIG_LOG_CONTROL_BASE_ADDR (ZCAT_W_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
|
| 65 | #define ZCAT_SIG_LOG_CONTROL_WPOINTER (ZCAT_SIG_LOG_CONTROL_BASE_ADDR)
|
| 66 | #define ZCAT_SIG_LOG_CONTROL_RPOINTER (ZCAT_SIG_LOG_CONTROL_WPOINTER + (2 >> CPU_SHIFT))
|
| 67 | #define ZCAT_SIG_LOG_CONTROL_CONTENT (ZCAT_SIG_LOG_CONTROL_RPOINTER + (2 >> CPU_SHIFT))
|
| 68 |
|
| 69 | ////ZCAT-TD
|
| 70 | #define ZCAT_TD_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_SIG_LOG_CONTROL_BASE_ADDR + ZCAT_PHY_LOG_CONTROL_SIZE)
|
| 71 | #define ZCAT_TD_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
|
| 72 |
|
| 73 | ////ZCAT-LTE
|
| 74 | #define ZCAT_LTE_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_TD_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_TD_PS_TO_PHY_BUFFER_SIZE)
|
| 75 | #define ZCAT_LTE_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
|
| 76 |
|
| 77 | ////ZCAT-WCDMA
|
| 78 | #define ZCAT_W_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_LTE_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_LTE_PS_TO_PHY_BUFFER_SIZE)
|
| 79 | #define ZCAT_W_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
|
| 80 |
|
| 81 | ////ZCAT-SIG
|
| 82 | #define ZCAT_SIG_PS_TO_PHY_BUFFER_BASE_ADDR (ZCAT_W_PS_TO_PHY_BUFFER_BASE_ADDR + ZCAT_W_PS_TO_PHY_BUFFER_SIZE)
|
| 83 | #define ZCAT_SIG_PS_TO_PHY_BUFFER_SIZE (0x00000200UL>>CPU_SHIFT)
|
| 84 |
|
| 85 | #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 + \
|
| 86 | 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)
|
| 87 | #endif
|
| 88 |
|