diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/riscv_encoding.h | 13 | ||||
| -rw-r--r-- | include/sbi/sbi_hart.h | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h index 64f0249b..2082783c 100644 --- a/include/sbi/riscv_encoding.h +++ b/include/sbi/riscv_encoding.h @@ -378,6 +378,17 @@ #define CSR_SSTATEEN2 0x10E #define CSR_SSTATEEN3 0x10F +/* Machine-Level Control transfer records CSRs */ +#define CSR_MCTRCTL 0x34e + +/* Supervisor-Level Control transfer records CSRs */ +#define CSR_SCTRCTL 0x14e +#define CSR_SCTRSTATUS 0x14f +#define CSR_SCTRDEPTH 0x15f + +/* VS-Level Control transfer records CSRs */ +#define CSR_VSCTRCTL 0x24e + /* ===== Hypervisor-level CSRs ===== */ /* Hypervisor Trap Setup (H-extension) */ @@ -802,6 +813,8 @@ #define SMSTATEEN0_CS (_ULL(1) << SMSTATEEN0_CS_SHIFT) #define SMSTATEEN0_FCSR_SHIFT 1 #define SMSTATEEN0_FCSR (_ULL(1) << SMSTATEEN0_FCSR_SHIFT) +#define SMSTATEEN0_CTR_SHIFT 54 +#define SMSTATEEN0_CTR (_ULL(1) << SMSTATEEN0_CTR_SHIFT) #define SMSTATEEN0_CONTEXT_SHIFT 57 #define SMSTATEEN0_CONTEXT (_ULL(1) << SMSTATEEN0_CONTEXT_SHIFT) #define SMSTATEEN0_IMSIC_SHIFT 58 diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index 4c36c778..c3a7feb7 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -75,6 +75,10 @@ enum sbi_hart_extensions { SBI_HART_EXT_ZICFISS, /** Hart has Ssdbltrp extension */ SBI_HART_EXT_SSDBLTRP, + /** HART has CTR M-mode CSRs */ + SBI_HART_EXT_SMCTR, + /** HART has CTR S-mode CSRs */ + SBI_HART_EXT_SSCTR, /** Maximum index of Hart extension */ SBI_HART_EXT_MAX, |
