annotate rvinterf/include/etm.h @ 1014:961efadd530a default tip

fc-shell TCH DL handler: add support for CSD modes TCH DL capture mechanism in FC Tourmaline firmware has been extended to support CSD modes in addition to speech - add the necessary support on the host tools side. It needs to be noted that this mechanism in its present state does NOT provide the debug utility value that was sought: as we learned only after the code was implemented, TI's DSP has a misfeature in that the buffer we are reading (a_dd_0[]) is zeroed out when the IDS block is enabled, i.e., we are reading all zeros and not the real DL bits we were after. But since the code has already been written, we are keeping it - perhaps we can do some tests with IDS disabled.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 26 Nov 2024 06:27:43 +0000
parents 214d4c1c7387
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This header file contains various definitions for talking to ETM.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 */
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #define ETM_USE_ID 0x001E0004
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 /* ETM Module IDs */
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 enum {
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 ETM_TM3 = 0x00, // Use of old TM3 protocol
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 ETM_CORE = 0x01,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 ETM_TMT = 0x02, // Pseudo module
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 ETM_SH = 0x03, // Pseudo module
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 ETM_TM3_MISC = 0x04, // Pseudo module - Target side
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 ETM_RF = 0x05,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 ETM_IMEI = 0x06,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 ETM_FFS2 = 0x07,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 ETM_AUDIO = 0x08,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 ETM_TPU = 0x09, // Not official part ETM
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 ETM_PWR = 0x0A,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 ETM_BT = 0x0B,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 ETM_L23 = 0x0C,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 ETM_RESERVED10 = 0x0D,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 ETM_RESERVED11 = 0x0E,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 ETM_RESERVED12 = 0x0F,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
814
214d4c1c7387 rvinterf/include/etm.h: add ETM_BSIM
Mychaela Falconia <falcon@freecalypso.org>
parents: 810
diff changeset
26 /* FreeCalypso addition */
214d4c1c7387 rvinterf/include/etm.h: add ETM_BSIM
Mychaela Falconia <falcon@freecalypso.org>
parents: 810
diff changeset
27 ETM_BSIM = 0x12,
214d4c1c7387 rvinterf/include/etm.h: add ETM_BSIM
Mychaela Falconia <falcon@freecalypso.org>
parents: 810
diff changeset
28
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 ETM_CUST = 0xC0, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 ETM_CUST1 = 0xC1, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 ETM_CUST2 = 0xC2, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 ETM_CUST3 = 0xC3, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 ETM_CUST4 = 0xC4, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 ETM_CUST5 = 0xC5, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 ETM_CUST6 = 0xC6, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 ETM_CUST7 = 0xC7, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 ETM_CUST8 = 0xC8, // Customize id
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 ETM_TEST = 0xAA, // used for test of dll's
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 ETM_TASK = 0xEE, // ETM TASK in Target
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 ETM_FFS1 = 0x70
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 };
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 /* ETM_CORE opcodes */
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #define TMCORE_OPC_MEM 0x61
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #define TMCORE_OPC_ECHO 0x62
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #define TMCORE_OPC_RESET 0x63
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #define TMCORE_OPC_DEBUG 0x64
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #define TMCORE_OPC_VERSION 0x65
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #define TMCORE_OPC_CODEC_RD 0x66
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #define TMCORE_OPC_CODEC_WR 0x67
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #define TMCORE_OPC_DIEID 0x68
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
810
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
55 /* TMCORE_OPC_DEBUG sub-opcodes */
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
56 #define TMDBG_OPC_ALLOC_BUF 0x00
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
57 #define TMDBG_OPC_FREE_BUF 0x01
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
58 #define TMDBG_OPC_TRACE_MASK 0x02
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
59 #define TMDBG_OPC_RVF_DUMP 0x03
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
60 /* FreeCalypso additions */
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
61 #define TMDBG_OPC_PWR_CYCLE 0x04
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
62 #define TMDBG_OPC_PWR_PRESS 0x05
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
63 #define TMDBG_OPC_PWR_RELEASE 0x06
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
64 #define TMDBG_OPC_PHONE_ON 0x07
c535e7438c25 rvinterf/include/etm.h: debug sub-opcode definitions
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
65
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 #define MAX_MEMREAD_BYTES 238
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #define MAX_MEMREAD_16BIT 119