diff --git a/arch/risc-v/include/csr.h b/arch/risc-v/include/csr.h index 01506883c0..32e2af5a19 100644 --- a/arch/risc-v/include/csr.h +++ b/arch/risc-v/include/csr.h @@ -328,6 +328,32 @@ #define CSR_VTYPE 0xc21 /* Vector Data Type */ #define CSR_VLENB 0xc22 /* Vector Length in Bytes (VLEN/8) */ +/* Indirect CSR Access CSRs */ + +#define CSR_MISELECT 0x350 /* Machine indirect register select */ +#define CSR_MIREG 0x351 /* Machine indirect register alias */ +#define CSR_MIREG2 0x352 /* Machine indirect register alias 2 */ +#define CSR_MIREG3 0x353 /* Machine indirect register alias 3 */ +#define CSR_MIREG4 0x355 /* Machine indirect register alias 4 */ +#define CSR_MIREG5 0x356 /* Machine indirect register alias 5 */ +#define CSR_MIREG6 0x357 /* Machine indirect register alias 6 */ + +#define CSR_SISELECT 0x150 /* Supervisor indirect register select */ +#define CSR_SIREG 0x151 /* Supervisor indirect register alias */ +#define CSR_SIREG2 0x152 /* Supervisor indirect register alias 2 */ +#define CSR_SIREG3 0x153 /* Supervisor indirect register alias 3 */ +#define CSR_SIREG4 0x155 /* Supervisor indirect register alias 4 */ +#define CSR_SIREG5 0x156 /* Supervisor indirect register alias 5 */ +#define CSR_SIREG6 0x157 /* Supervisor indirect register alias 6 */ + +#define CSR_VSISELECT 0x250 /* Virtual supervisor indirect register select */ +#define CSR_VSIREG 0x251 /* Virtual supervisor indirect register alias */ +#define CSR_VSIREG2 0x252 /* Virtual supervisor indirect register alias 2 */ +#define CSR_VSIREG3 0x253 /* Virtual supervisor indirect register alias 3 */ +#define CSR_VSIREG4 0x255 /* Virtual supervisor indirect register alias 4 */ +#define CSR_VSIREG5 0x256 /* Virtual supervisor indirect register alias 5 */ +#define CSR_VSIREG6 0x257 /* Virtual supervisor indirect register alias 6 */ + /* In mstatus register */ #define MSTATUS_UIE (0x1 << 0) /* User Interrupt Enable */