target/riscv: Add MEDELEGH, HEDELEGH csrs for RV32
authorFea.Wang <fea.wang@sifive.com>
Thu, 6 Jun 2024 13:54:52 +0000 (21:54 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 26 Jun 2024 12:56:01 +0000 (22:56 +1000)
commit27796989ac55983e95bc0538310fd5ee2eefba59
treef2811202c488ef60365a6885f26904d1274ab92f
parent7750e10656352bc9945843fa6116dc1035e1c9b4
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>
target/riscv/cpu_bits.h
target/riscv/csr.c