diff options
author | Fea.Wang <fea.wang@sifive.com> | 2024-06-06 21:54:52 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2024-06-26 22:56:01 +1000 |
commit | 27796989ac55983e95bc0538310fd5ee2eefba59 (patch) | |
tree | f2811202c488ef60365a6885f26904d1274ab92f /target/riscv/cpu_bits.h | |
parent | 7750e10656352bc9945843fa6116dc1035e1c9b4 (diff) |
target/riscv: Add MEDELEGH, HEDELEGH csrs for RV32
Based on privileged spec 1.13, the RV32 needs to implement MEDELEGH
and HEDELEGH for exception codes 32-47 for reserving and exception codes
48-63 for custom use. Add the CSR number though the implementation is
just reading zero and writing ignore. Besides, for accessing HEDELEGH, it
should be controlled by mstateen0 'P1P13' bit.
Signed-off-by: Fea.Wang <fea.wang@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240606135454.119186-5-fea.wang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/cpu_bits.h')
-rw-r--r-- | target/riscv/cpu_bits.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index c895aa0334..096a51b331 100644 --- a/target/riscv/cpu_bits.h +++ b/target/riscv/cpu_bits.h @@ -156,6 +156,8 @@ /* 32-bit only */ #define CSR_MSTATUSH 0x310 +#define CSR_MEDELEGH 0x312 +#define CSR_HEDELEGH 0x612 /* Machine Trap Handling */ #define CSR_MSCRATCH 0x340 |