-
Notifications
You must be signed in to change notification settings - Fork 5
/
hammer_enums.h
355 lines (352 loc) · 11.5 KB
/
hammer_enums.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
// SPDX-FileCopyrightText: 2022 Rivos Inc.
//
// SPDX-License-Identifier: Apache-2.0
#include "riscv/encoding.h"
#include "riscv/platform.h"
enum PlatformDefines {
DefaultRstVec = DEFAULT_RSTVEC,
ClintBase = CLINT_BASE,
ClintSize = CLINT_SIZE,
ExtIOBase = EXT_IO_BASE,
DramBase = DRAM_BASE
};
enum CsrDefines {
FFLAGS_CSR = CSR_FFLAGS,
FRM_CSR = CSR_FRM,
FCSR_CSR = CSR_FCSR,
VSTART_CSR = CSR_VSTART,
VXSAT_CSR = CSR_VXSAT,
VXRM_CSR = CSR_VXRM,
VCSR_CSR = CSR_VCSR,
SEED_CSR = CSR_SEED,
CYCLE_CSR = CSR_CYCLE,
TIME_CSR = CSR_TIME,
INSTRET_CSR = CSR_INSTRET,
HPMCOUNTER3_CSR = CSR_HPMCOUNTER3,
HPMCOUNTER4_CSR = CSR_HPMCOUNTER4,
HPMCOUNTER5_CSR = CSR_HPMCOUNTER5,
HPMCOUNTER6_CSR = CSR_HPMCOUNTER6,
HPMCOUNTER7_CSR = CSR_HPMCOUNTER7,
HPMCOUNTER8_CSR = CSR_HPMCOUNTER8,
HPMCOUNTER9_CSR = CSR_HPMCOUNTER9,
HPMCOUNTER10_CSR = CSR_HPMCOUNTER10,
HPMCOUNTER11_CSR = CSR_HPMCOUNTER11,
HPMCOUNTER12_CSR = CSR_HPMCOUNTER12,
HPMCOUNTER13_CSR = CSR_HPMCOUNTER13,
HPMCOUNTER14_CSR = CSR_HPMCOUNTER14,
HPMCOUNTER15_CSR = CSR_HPMCOUNTER15,
HPMCOUNTER16_CSR = CSR_HPMCOUNTER16,
HPMCOUNTER17_CSR = CSR_HPMCOUNTER17,
HPMCOUNTER18_CSR = CSR_HPMCOUNTER18,
HPMCOUNTER19_CSR = CSR_HPMCOUNTER19,
HPMCOUNTER20_CSR = CSR_HPMCOUNTER20,
HPMCOUNTER21_CSR = CSR_HPMCOUNTER21,
HPMCOUNTER22_CSR = CSR_HPMCOUNTER22,
HPMCOUNTER23_CSR = CSR_HPMCOUNTER23,
HPMCOUNTER24_CSR = CSR_HPMCOUNTER24,
HPMCOUNTER25_CSR = CSR_HPMCOUNTER25,
HPMCOUNTER26_CSR = CSR_HPMCOUNTER26,
HPMCOUNTER27_CSR = CSR_HPMCOUNTER27,
HPMCOUNTER28_CSR = CSR_HPMCOUNTER28,
HPMCOUNTER29_CSR = CSR_HPMCOUNTER29,
HPMCOUNTER30_CSR = CSR_HPMCOUNTER30,
HPMCOUNTER31_CSR = CSR_HPMCOUNTER31,
VL_CSR = CSR_VL,
VTYPE_CSR = CSR_VTYPE,
VLENB_CSR = CSR_VLENB,
SSTATUS_CSR = CSR_SSTATUS,
SEDELEG_CSR = CSR_SEDELEG,
SIDELEG_CSR = CSR_SIDELEG,
SIE_CSR = CSR_SIE,
STVEC_CSR = CSR_STVEC,
SCOUNTEREN_CSR = CSR_SCOUNTEREN,
SENVCFG_CSR = CSR_SENVCFG,
SSCRATCH_CSR = CSR_SSCRATCH,
SEPC_CSR = CSR_SEPC,
SCAUSE_CSR = CSR_SCAUSE,
STVAL_CSR = CSR_STVAL,
SIP_CSR = CSR_SIP,
SATP_CSR = CSR_SATP,
SCONTEXT_CSR = CSR_SCONTEXT,
VSSTATUS_CSR = CSR_VSSTATUS,
VSIE_CSR = CSR_VSIE,
VSTVEC_CSR = CSR_VSTVEC,
VSSCRATCH_CSR = CSR_VSSCRATCH,
VSEPC_CSR = CSR_VSEPC,
VSCAUSE_CSR = CSR_VSCAUSE,
VSTVAL_CSR = CSR_VSTVAL,
VSIP_CSR = CSR_VSIP,
VSATP_CSR = CSR_VSATP,
HSTATUS_CSR = CSR_HSTATUS,
HEDELEG_CSR = CSR_HEDELEG,
HIDELEG_CSR = CSR_HIDELEG,
HIE_CSR = CSR_HIE,
HTIMEDELTA_CSR = CSR_HTIMEDELTA,
HCOUNTEREN_CSR = CSR_HCOUNTEREN,
HGEIE_CSR = CSR_HGEIE,
HENVCFG_CSR = CSR_HENVCFG,
HTVAL_CSR = CSR_HTVAL,
HIP_CSR = CSR_HIP,
HVIP_CSR = CSR_HVIP,
HTINST_CSR = CSR_HTINST,
HGATP_CSR = CSR_HGATP,
HCONTEXT_CSR = CSR_HCONTEXT,
HGEIP_CSR = CSR_HGEIP,
UTVT_CSR = CSR_UTVT,
UNXTI_CSR = CSR_UNXTI,
UINTSTATUS_CSR = CSR_UINTSTATUS,
USCRATCHCSW_CSR = CSR_USCRATCHCSW,
USCRATCHCSWL_CSR = CSR_USCRATCHCSWL,
STVT_CSR = CSR_STVT,
SNXTI_CSR = CSR_SNXTI,
SINTSTATUS_CSR = CSR_SINTSTATUS,
SSCRATCHCSW_CSR = CSR_SSCRATCHCSW,
SSCRATCHCSWL_CSR = CSR_SSCRATCHCSWL,
MTVT_CSR = CSR_MTVT,
MNXTI_CSR = CSR_MNXTI,
MINTSTATUS_CSR = CSR_MINTSTATUS,
MSCRATCHCSW_CSR = CSR_MSCRATCHCSW,
MSCRATCHCSWL_CSR = CSR_MSCRATCHCSWL,
MSTATUS_CSR = CSR_MSTATUS,
MISA_CSR = CSR_MISA,
MEDELEG_CSR = CSR_MEDELEG,
MIDELEG_CSR = CSR_MIDELEG,
MIE_CSR = CSR_MIE,
MTVEC_CSR = CSR_MTVEC,
MCOUNTEREN_CSR = CSR_MCOUNTEREN,
MENVCFG_CSR = CSR_MENVCFG,
MCOUNTINHIBIT_CSR = CSR_MCOUNTINHIBIT,
MSCRATCH_CSR = CSR_MSCRATCH,
MEPC_CSR = CSR_MEPC,
MCAUSE_CSR = CSR_MCAUSE,
MTVAL_CSR = CSR_MTVAL,
MIP_CSR = CSR_MIP,
MTINST_CSR = CSR_MTINST,
MTVAL2_CSR = CSR_MTVAL2,
PMPCFG0_CSR = CSR_PMPCFG0,
PMPCFG1_CSR = CSR_PMPCFG1,
PMPCFG2_CSR = CSR_PMPCFG2,
PMPCFG3_CSR = CSR_PMPCFG3,
PMPCFG4_CSR = CSR_PMPCFG4,
PMPCFG5_CSR = CSR_PMPCFG5,
PMPCFG6_CSR = CSR_PMPCFG6,
PMPCFG7_CSR = CSR_PMPCFG7,
PMPCFG8_CSR = CSR_PMPCFG8,
PMPCFG9_CSR = CSR_PMPCFG9,
PMPCFG10_CSR = CSR_PMPCFG10,
PMPCFG11_CSR = CSR_PMPCFG11,
PMPCFG12_CSR = CSR_PMPCFG12,
PMPCFG13_CSR = CSR_PMPCFG13,
PMPCFG14_CSR = CSR_PMPCFG14,
PMPCFG15_CSR = CSR_PMPCFG15,
PMPADDR0_CSR = CSR_PMPADDR0,
PMPADDR1_CSR = CSR_PMPADDR1,
PMPADDR2_CSR = CSR_PMPADDR2,
PMPADDR3_CSR = CSR_PMPADDR3,
PMPADDR4_CSR = CSR_PMPADDR4,
PMPADDR5_CSR = CSR_PMPADDR5,
PMPADDR6_CSR = CSR_PMPADDR6,
PMPADDR7_CSR = CSR_PMPADDR7,
PMPADDR8_CSR = CSR_PMPADDR8,
PMPADDR9_CSR = CSR_PMPADDR9,
PMPADDR10_CSR = CSR_PMPADDR10,
PMPADDR11_CSR = CSR_PMPADDR11,
PMPADDR12_CSR = CSR_PMPADDR12,
PMPADDR13_CSR = CSR_PMPADDR13,
PMPADDR14_CSR = CSR_PMPADDR14,
PMPADDR15_CSR = CSR_PMPADDR15,
PMPADDR16_CSR = CSR_PMPADDR16,
PMPADDR17_CSR = CSR_PMPADDR17,
PMPADDR18_CSR = CSR_PMPADDR18,
PMPADDR19_CSR = CSR_PMPADDR19,
PMPADDR20_CSR = CSR_PMPADDR20,
PMPADDR21_CSR = CSR_PMPADDR21,
PMPADDR22_CSR = CSR_PMPADDR22,
PMPADDR23_CSR = CSR_PMPADDR23,
PMPADDR24_CSR = CSR_PMPADDR24,
PMPADDR25_CSR = CSR_PMPADDR25,
PMPADDR26_CSR = CSR_PMPADDR26,
PMPADDR27_CSR = CSR_PMPADDR27,
PMPADDR28_CSR = CSR_PMPADDR28,
PMPADDR29_CSR = CSR_PMPADDR29,
PMPADDR30_CSR = CSR_PMPADDR30,
PMPADDR31_CSR = CSR_PMPADDR31,
PMPADDR32_CSR = CSR_PMPADDR32,
PMPADDR33_CSR = CSR_PMPADDR33,
PMPADDR34_CSR = CSR_PMPADDR34,
PMPADDR35_CSR = CSR_PMPADDR35,
PMPADDR36_CSR = CSR_PMPADDR36,
PMPADDR37_CSR = CSR_PMPADDR37,
PMPADDR38_CSR = CSR_PMPADDR38,
PMPADDR39_CSR = CSR_PMPADDR39,
PMPADDR40_CSR = CSR_PMPADDR40,
PMPADDR41_CSR = CSR_PMPADDR41,
PMPADDR42_CSR = CSR_PMPADDR42,
PMPADDR43_CSR = CSR_PMPADDR43,
PMPADDR44_CSR = CSR_PMPADDR44,
PMPADDR45_CSR = CSR_PMPADDR45,
PMPADDR46_CSR = CSR_PMPADDR46,
PMPADDR47_CSR = CSR_PMPADDR47,
PMPADDR48_CSR = CSR_PMPADDR48,
PMPADDR49_CSR = CSR_PMPADDR49,
PMPADDR50_CSR = CSR_PMPADDR50,
PMPADDR51_CSR = CSR_PMPADDR51,
PMPADDR52_CSR = CSR_PMPADDR52,
PMPADDR53_CSR = CSR_PMPADDR53,
PMPADDR54_CSR = CSR_PMPADDR54,
PMPADDR55_CSR = CSR_PMPADDR55,
PMPADDR56_CSR = CSR_PMPADDR56,
PMPADDR57_CSR = CSR_PMPADDR57,
PMPADDR58_CSR = CSR_PMPADDR58,
PMPADDR59_CSR = CSR_PMPADDR59,
PMPADDR60_CSR = CSR_PMPADDR60,
PMPADDR61_CSR = CSR_PMPADDR61,
PMPADDR62_CSR = CSR_PMPADDR62,
PMPADDR63_CSR = CSR_PMPADDR63,
MSECCFG_CSR = CSR_MSECCFG,
TSELECT_CSR = CSR_TSELECT,
TDATA1_CSR = CSR_TDATA1,
TDATA2_CSR = CSR_TDATA2,
TDATA3_CSR = CSR_TDATA3,
TINFO_CSR = CSR_TINFO,
TCONTROL_CSR = CSR_TCONTROL,
MCONTEXT_CSR = CSR_MCONTEXT,
MSCONTEXT_CSR = CSR_MSCONTEXT,
DCSR_CSR = CSR_DCSR,
DPC_CSR = CSR_DPC,
DSCRATCH0_CSR = CSR_DSCRATCH0,
DSCRATCH1_CSR = CSR_DSCRATCH1,
MCYCLE_CSR = CSR_MCYCLE,
MINSTRET_CSR = CSR_MINSTRET,
MHPMCOUNTER3_CSR = CSR_MHPMCOUNTER3,
MHPMCOUNTER4_CSR = CSR_MHPMCOUNTER4,
MHPMCOUNTER5_CSR = CSR_MHPMCOUNTER5,
MHPMCOUNTER6_CSR = CSR_MHPMCOUNTER6,
MHPMCOUNTER7_CSR = CSR_MHPMCOUNTER7,
MHPMCOUNTER8_CSR = CSR_MHPMCOUNTER8,
MHPMCOUNTER9_CSR = CSR_MHPMCOUNTER9,
MHPMCOUNTER10_CSR = CSR_MHPMCOUNTER10,
MHPMCOUNTER11_CSR = CSR_MHPMCOUNTER11,
MHPMCOUNTER12_CSR = CSR_MHPMCOUNTER12,
MHPMCOUNTER13_CSR = CSR_MHPMCOUNTER13,
MHPMCOUNTER14_CSR = CSR_MHPMCOUNTER14,
MHPMCOUNTER15_CSR = CSR_MHPMCOUNTER15,
MHPMCOUNTER16_CSR = CSR_MHPMCOUNTER16,
MHPMCOUNTER17_CSR = CSR_MHPMCOUNTER17,
MHPMCOUNTER18_CSR = CSR_MHPMCOUNTER18,
MHPMCOUNTER19_CSR = CSR_MHPMCOUNTER19,
MHPMCOUNTER20_CSR = CSR_MHPMCOUNTER20,
MHPMCOUNTER21_CSR = CSR_MHPMCOUNTER21,
MHPMCOUNTER22_CSR = CSR_MHPMCOUNTER22,
MHPMCOUNTER23_CSR = CSR_MHPMCOUNTER23,
MHPMCOUNTER24_CSR = CSR_MHPMCOUNTER24,
MHPMCOUNTER25_CSR = CSR_MHPMCOUNTER25,
MHPMCOUNTER26_CSR = CSR_MHPMCOUNTER26,
MHPMCOUNTER27_CSR = CSR_MHPMCOUNTER27,
MHPMCOUNTER28_CSR = CSR_MHPMCOUNTER28,
MHPMCOUNTER29_CSR = CSR_MHPMCOUNTER29,
MHPMCOUNTER30_CSR = CSR_MHPMCOUNTER30,
MHPMCOUNTER31_CSR = CSR_MHPMCOUNTER31,
MHPMEVENT3_CSR = CSR_MHPMEVENT3,
MHPMEVENT4_CSR = CSR_MHPMEVENT4,
MHPMEVENT5_CSR = CSR_MHPMEVENT5,
MHPMEVENT6_CSR = CSR_MHPMEVENT6,
MHPMEVENT7_CSR = CSR_MHPMEVENT7,
MHPMEVENT8_CSR = CSR_MHPMEVENT8,
MHPMEVENT9_CSR = CSR_MHPMEVENT9,
MHPMEVENT10_CSR = CSR_MHPMEVENT10,
MHPMEVENT11_CSR = CSR_MHPMEVENT11,
MHPMEVENT12_CSR = CSR_MHPMEVENT12,
MHPMEVENT13_CSR = CSR_MHPMEVENT13,
MHPMEVENT14_CSR = CSR_MHPMEVENT14,
MHPMEVENT15_CSR = CSR_MHPMEVENT15,
MHPMEVENT16_CSR = CSR_MHPMEVENT16,
MHPMEVENT17_CSR = CSR_MHPMEVENT17,
MHPMEVENT18_CSR = CSR_MHPMEVENT18,
MHPMEVENT19_CSR = CSR_MHPMEVENT19,
MHPMEVENT20_CSR = CSR_MHPMEVENT20,
MHPMEVENT21_CSR = CSR_MHPMEVENT21,
MHPMEVENT22_CSR = CSR_MHPMEVENT22,
MHPMEVENT23_CSR = CSR_MHPMEVENT23,
MHPMEVENT24_CSR = CSR_MHPMEVENT24,
MHPMEVENT25_CSR = CSR_MHPMEVENT25,
MHPMEVENT26_CSR = CSR_MHPMEVENT26,
MHPMEVENT27_CSR = CSR_MHPMEVENT27,
MHPMEVENT28_CSR = CSR_MHPMEVENT28,
MHPMEVENT29_CSR = CSR_MHPMEVENT29,
MHPMEVENT30_CSR = CSR_MHPMEVENT30,
MHPMEVENT31_CSR = CSR_MHPMEVENT31,
MVENDORID_CSR = CSR_MVENDORID,
MARCHID_CSR = CSR_MARCHID,
MIMPID_CSR = CSR_MIMPID,
MHARTID_CSR = CSR_MHARTID,
MCONFIGPTR_CSR = CSR_MCONFIGPTR,
HTIMEDELTAH_CSR = CSR_HTIMEDELTAH,
HENVCFGH_CSR = CSR_HENVCFGH,
CYCLEH_CSR = CSR_CYCLEH,
TIMEH_CSR = CSR_TIMEH,
INSTRETH_CSR = CSR_INSTRETH,
HPMCOUNTER3H_CSR = CSR_HPMCOUNTER3H,
HPMCOUNTER4H_CSR = CSR_HPMCOUNTER4H,
HPMCOUNTER5H_CSR = CSR_HPMCOUNTER5H,
HPMCOUNTER6H_CSR = CSR_HPMCOUNTER6H,
HPMCOUNTER7H_CSR = CSR_HPMCOUNTER7H,
HPMCOUNTER8H_CSR = CSR_HPMCOUNTER8H,
HPMCOUNTER9H_CSR = CSR_HPMCOUNTER9H,
HPMCOUNTER10H_CSR = CSR_HPMCOUNTER10H,
HPMCOUNTER11H_CSR = CSR_HPMCOUNTER11H,
HPMCOUNTER12H_CSR = CSR_HPMCOUNTER12H,
HPMCOUNTER13H_CSR = CSR_HPMCOUNTER13H,
HPMCOUNTER14H_CSR = CSR_HPMCOUNTER14H,
HPMCOUNTER15H_CSR = CSR_HPMCOUNTER15H,
HPMCOUNTER16H_CSR = CSR_HPMCOUNTER16H,
HPMCOUNTER17H_CSR = CSR_HPMCOUNTER17H,
HPMCOUNTER18H_CSR = CSR_HPMCOUNTER18H,
HPMCOUNTER19H_CSR = CSR_HPMCOUNTER19H,
HPMCOUNTER20H_CSR = CSR_HPMCOUNTER20H,
HPMCOUNTER21H_CSR = CSR_HPMCOUNTER21H,
HPMCOUNTER22H_CSR = CSR_HPMCOUNTER22H,
HPMCOUNTER23H_CSR = CSR_HPMCOUNTER23H,
HPMCOUNTER24H_CSR = CSR_HPMCOUNTER24H,
HPMCOUNTER25H_CSR = CSR_HPMCOUNTER25H,
HPMCOUNTER26H_CSR = CSR_HPMCOUNTER26H,
HPMCOUNTER27H_CSR = CSR_HPMCOUNTER27H,
HPMCOUNTER28H_CSR = CSR_HPMCOUNTER28H,
HPMCOUNTER29H_CSR = CSR_HPMCOUNTER29H,
HPMCOUNTER30H_CSR = CSR_HPMCOUNTER30H,
HPMCOUNTER31H_CSR = CSR_HPMCOUNTER31H,
MSTATUSH_CSR = CSR_MSTATUSH,
MENVCFGH_CSR = CSR_MENVCFGH,
MSECCFGH_CSR = CSR_MSECCFGH,
MCYCLEH_CSR = CSR_MCYCLEH,
MINSTRETH_CSR = CSR_MINSTRETH,
MHPMCOUNTER3H_CSR = CSR_MHPMCOUNTER3H,
MHPMCOUNTER4H_CSR = CSR_MHPMCOUNTER4H,
MHPMCOUNTER5H_CSR = CSR_MHPMCOUNTER5H,
MHPMCOUNTER6H_CSR = CSR_MHPMCOUNTER6H,
MHPMCOUNTER7H_CSR = CSR_MHPMCOUNTER7H,
MHPMCOUNTER8H_CSR = CSR_MHPMCOUNTER8H,
MHPMCOUNTER9H_CSR = CSR_MHPMCOUNTER9H,
MHPMCOUNTER10H_CSR = CSR_MHPMCOUNTER10H,
MHPMCOUNTER11H_CSR = CSR_MHPMCOUNTER11H,
MHPMCOUNTER12H_CSR = CSR_MHPMCOUNTER12H,
MHPMCOUNTER13H_CSR = CSR_MHPMCOUNTER13H,
MHPMCOUNTER14H_CSR = CSR_MHPMCOUNTER14H,
MHPMCOUNTER15H_CSR = CSR_MHPMCOUNTER15H,
MHPMCOUNTER16H_CSR = CSR_MHPMCOUNTER16H,
MHPMCOUNTER17H_CSR = CSR_MHPMCOUNTER17H,
MHPMCOUNTER18H_CSR = CSR_MHPMCOUNTER18H,
MHPMCOUNTER19H_CSR = CSR_MHPMCOUNTER19H,
MHPMCOUNTER20H_CSR = CSR_MHPMCOUNTER20H,
MHPMCOUNTER21H_CSR = CSR_MHPMCOUNTER21H,
MHPMCOUNTER22H_CSR = CSR_MHPMCOUNTER22H,
MHPMCOUNTER23H_CSR = CSR_MHPMCOUNTER23H,
MHPMCOUNTER24H_CSR = CSR_MHPMCOUNTER24H,
MHPMCOUNTER25H_CSR = CSR_MHPMCOUNTER25H,
MHPMCOUNTER26H_CSR = CSR_MHPMCOUNTER26H,
MHPMCOUNTER27H_CSR = CSR_MHPMCOUNTER27H,
MHPMCOUNTER28H_CSR = CSR_MHPMCOUNTER28H,
MHPMCOUNTER29H_CSR = CSR_MHPMCOUNTER29H,
MHPMCOUNTER30H_CSR = CSR_MHPMCOUNTER30H,
MHPMCOUNTER31H_CSR = CSR_MHPMCOUNTER31H
};