parent
948ff6493b
commit
13f7f21b49
@ -0,0 +1,38 @@ |
||||
#ifndef CSR_H |
||||
#define CSR_H |
||||
|
||||
/* ZICSR : Control and Status Registers */ |
||||
#define CSR_COUNT 0x2000 |
||||
|
||||
/* Machine-level CSR */ |
||||
#define CSR_MVENDORID 0xF11 |
||||
#define CSR_MARCHID 0xF12 |
||||
#define CSR_MIMPID 0xF13 |
||||
#define CSR_MHARTID 0xF14 |
||||
#define CSR_MCONFIGPTR 0xF15 |
||||
/* Machine Trap setup CSR */ |
||||
#define CSR_MSTATUS 0x300 |
||||
#define CSR_MISA 0x301 |
||||
#define CSR_MEDELEG 0x302 |
||||
#define CSR_MIDELEG 0x303 |
||||
#define CSR_MIE 0x304 |
||||
#define CSR_MTVEC 0x305 |
||||
#define CSR_MCOUNTEREN 0x306 |
||||
#define CSR_MSTATUSH 0x310 |
||||
/* Machine Trap handling CSR */ |
||||
#define CSR_MSCRATCH 0x340 |
||||
#define CSR_MEPC 0x341 |
||||
#define CSR_MCAUSE 0x342 |
||||
#define CSR_MTVAL 0x343 |
||||
#define CSR_MIP 0x344 |
||||
#define CSR_MTINST 0x34A |
||||
#define CSR_MTVAL2 0x34B |
||||
/* Machine Configuration */ |
||||
#define CSR_MENVCFG 0x30A |
||||
#define CSR_MENVCFGH 0x31A |
||||
#define CSR_MSECCFG 0x747 |
||||
#define CSR_MSECCFGH 0x757 |
||||
/* Machine Memory Protection */ |
||||
#define CSR_PMPCFG0 0x3A0 |
||||
|
||||
#endif |
Loading…
Reference in new issue