Zephyr Project API
4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
cr.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2025 Infineon Technologies AG,
3
* SPDX-FileCopyrightText: or an affiliate of Infineon Technologies AG. All rights reserved.
4
* SPDX-FileCopyrightText: Copyright (c) 2026 Linumiz
5
*
6
* SPDX-License-Identifier: Apache-2.0
7
*/
8
13
14
#ifndef ZEPHYR_INCLUDE_ARCH_TRICORE_CR_H_
15
#define ZEPHYR_INCLUDE_ARCH_TRICORE_CR_H_
16
18
19
/* CPU Register */
20
#define TRICORE_SEGEN 0x1030
21
#define TRICORE_LCLTEST 0x1040
22
#define TRICORE_PMA0 0x8100
23
#define TRICORE_PMA1 0x8104
24
#define TRICORE_PMA2 0x8108
25
#define TRICORE_DCON2 0x9000
26
#define TRICORE_DCON1 0x9008
27
#define TRICORE_SMACON 0x900C
28
#define TRICORE_DSTR 0x9010
29
#define TRICORE_DATR 0x9018
30
#define TRICORE_DEADD 0x901C
31
#define TRICORE_DIEAR 0x9020
32
#define TRICORE_DIETR 0x9024
33
#define TRICORE_DCON0 0x9040
34
#define TRICORE_PSTR 0x9200
35
#define TRICORE_PCON1 0x9204
36
#define TRICORE_PCON2 0x9208
37
#define TRICORE_PCON0 0x920C
38
#define TRICORE_PIEAR 0x9210
39
#define TRICORE_PIETR 0x9214
40
#define TRICORE_COMPAT 0x9400
41
#define TRICORE_FPU_TRAP_CON 0xA000
42
#define TRICORE_FPU_TRAP_PC 0xA004
43
#define TRICORE_FPU_TRAP_OPC 0xA008
44
#define TRICORE_FPU_TRAP_SRC1_L 0xA010
45
#define TRICORE_FPU_TRAP_SRC1_U 0xA014
46
#define TRICORE_FPU_TRAP_SRC2_L 0xA018
47
#define TRICORE_FPU_TRAP_SRC2_U 0xA01C
48
#define TRICORE_FPU_TRAP_SRC3_L 0xA020
49
#define TRICORE_FPU_TRAP_SRC3_U 0xA024
50
#define TRICORE_FPU_SYNC_TRAP_CON 0xA030
51
#define TRICORE_FPU_SYNC_TRAP_OPC 0xA034
52
53
/* Virtualization Control Registers */
54
#define TRICORE_VCON0 0xB000
55
#define TRICORE_VCON1 0xB004
56
#define TRICORE_VCON2 0xB008
57
#define TRICORE_BHV 0xB010
58
#define TRICORE_VM0_ICR 0xB100
59
#define TRICORE_VM1_ICR 0xB104
60
#define TRICORE_VM2_ICR 0xB108
61
#define TRICORE_VM3_ICR 0xB10C
62
#define TRICORE_VM4_ICR 0xB110
63
#define TRICORE_VM5_ICR 0xB114
64
#define TRICORE_VM6_ICR 0xB118
65
#define TRICORE_VM7_ICR 0xB11C
66
#define TRICORE_VM0_PETHRESH 0xB200
67
#define TRICORE_VM1_PETHRESH 0xB204
68
#define TRICORE_VM2_PETHRESH 0xB208
69
#define TRICORE_VM3_PETHRESH 0xB20C
70
#define TRICORE_VM4_PETHRESH 0xB210
71
#define TRICORE_VM5_PETHRESH 0xB214
72
#define TRICORE_VM6_PETHRESH 0xB218
73
#define TRICORE_VM7_PETHRESH 0xB21C
74
75
/* Temporal Protection System Registers */
76
#define TRICORE_TPS_CON 0xE400
77
#define TRICORE_TPS_TIMER0 0xE404
78
#define TRICORE_TPS_TIMER1 0xE408
79
#define TRICORE_TPS_TIMER2 0xE40C
80
81
/* Trigger Registers */
82
#define TRICORE_TR0_EVT 0xF000
83
#define TRICORE_TR0_ADR 0xF004
84
#define TRICORE_TR1_EVT 0xF008
85
#define TRICORE_TR1_ADR 0xF00C
86
#define TRICORE_TR2_EVT 0xF010
87
#define TRICORE_TR2_ADR 0xF014
88
#define TRICORE_TR3_EVT 0xF018
89
#define TRICORE_TR3_ADR 0xF01C
90
#define TRICORE_TR4_EVT 0xF020
91
#define TRICORE_TR4_ADR 0xF024
92
#define TRICORE_TR5_EVT 0xF028
93
#define TRICORE_TR5_ADR 0xF02C
94
#define TRICORE_TR6_EVT 0xF030
95
#define TRICORE_TR6_ADR 0xF034
96
#define TRICORE_TR7_EVT 0xF038
97
#define TRICORE_TR7_ADR 0xF03C
98
99
/* Performance Counter Registers */
100
#define TRICORE_CCTRL 0xFC00
101
#define TRICORE_CCNT 0xFC04
102
#define TRICORE_ICNT 0xFC08
103
#define TRICORE_M1CNT 0xFC0C
104
#define TRICORE_M2CNT 0xFC10
105
#define TRICORE_M3CNT 0xFC14
106
107
/* Debug Registers */
108
#define TRICORE_DBGSR 0xFD00
109
#define TRICORE_EXEVT 0xFD08
110
#define TRICORE_CREVT 0xFD0C
111
#define TRICORE_SWEVT 0xFD10
112
#define TRICORE_DBGACT 0xFD14
113
#define TRICORE_TRIG_ACC 0xFD30
114
#define TRICORE_DMS 0xFD40
115
#define TRICORE_DCX 0xFD44
116
#define TRICORE_DBGTCR 0xFD48
117
#define TRICORE_DBGCFG 0xFD4C
118
#define TRICORE_TRCCFG 0xFD50
119
#define TRICORE_TRCFILT 0xFD54
120
#define TRICORE_TRCLIM 0xFD58
121
#define TRICORE_TS16PTCCTRL 0xFD60
122
123
/* Core Registers */
124
#define TRICORE_PCXI 0xFE00
125
#define TRICORE_PSW 0xFE04
126
#define TRICORE_PC 0xFE08
127
#define TRICORE_CORECON 0xFE14
128
#define TRICORE_CPU_ID 0xFE18
129
#define TRICORE_CORE_ID 0xFE1C
130
#define TRICORE_BIV 0xFE20
131
#define TRICORE_BTV 0xFE24
132
#define TRICORE_ISP 0xFE28
133
#define TRICORE_ICR 0xFE2C
134
#define TRICORE_FCX 0xFE38
135
#define TRICORE_LCX 0xFE3C
136
#define TRICORE_SWID 0xFE40
137
#define TRICORE_CUS_ID 0xFE50
138
#define TRICORE_BOOTCON 0xFE60
139
#define TRICORE_LCLCON 0xFE64
140
#define TRICORE_CCON 0xFE68
141
#define TRICORE_TCCON 0xFE6C
142
143
#define INSERT_FIELD(val, which, fieldval) \
144
(((val) & ~(which)) | ((fieldval) * ((which) & ~((which) - 1))))
145
146
#define cr_read(cr) \
147
({ \
148
register unsigned long __rv; \
149
__asm__ volatile("mfcr %0, " STRINGIFY(cr) : "=d"(__rv)); \
150
__rv; \
151
})
152
153
#define cr_write(cr, val) \
154
({ \
155
unsigned long __wv = (unsigned long)(val); \
156
__asm__ volatile("mtcr " STRINGIFY(cr) ", %0\n\tisync" : : "r"(__wv) : "memory"); \
157
})
158
160
161
#endif
/* ZEPHYR_INCLUDE_ARCH_TRICORE_CR_H_ */
include
zephyr
arch
tricore
cr.h
Generated on
for Zephyr Project API by
1.16.1