ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

mstateen0h

T1 riscv register register
Upper 32 bits of Machine State Enable 0 Register
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (Smstateen)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeM
ExtensionsSmstateen

Summary

For RV64 harts, the Smstateen extension adds four new 64-bit CSRs at machine level: mstateen0 (Machine State Enable 0), mstateen1, mstateen2, and mstateen3. For RV32, the registers listed above are 32-bit, and for the machine-level CSRs there is a corresponding set of high-half CSRs for the upper 32 bits of each register: mstateen0h, mstateen1h, mstateen2h, mstateen3h.

Syntax / Encoding

CSR 0x31c (M-mode, RW)

Bitfields (9)

BitsFieldDescription
31SE0The SE0 bit in mstateen0h controls access to the hstateen0, hstateen0h, and the sstateen0 CSRs.
30ENVCFGThe ENVCFG bit in mstateen0h controls access to the henvcfg, henvcfgh, and the senvcfg CSRs.
28CSRINDThe CSRIND bit in mstateen0h controls access to the siselect, sireg*, vsiselect, and the vsireg* CSRs provided by the Sscsrind extensions.
27AIAThe AIA bit in mstateen0h controls access to all state introduced by the Ssaia extension and is not controlled by either the CSRIND or the IMSIC bits.
26IMSICThe IMSIC bit in mstateen0h controls access to the IMSIC state, including CSRs stopei and vstopei, provided by the Ssaia extension.
25CONTEXTThe CONTEXT bit in mstateen0h controls access to the scontext and hcontext CSRs provided by the Sdtrig extension.
24P1P13The P1P13 bit in mstateen0h controls access to the hedelegh introduced by Privileged Specification Version 1.13.
23SRMCFGThe SRMCFG bit in mstateen0h controls access to the srmcfg CSR introduced by the Ssqosid Chapter 18 extension.
22CTRWhen Smstateen is implemented, the mstateen0.CTR bit controls access to CTR register state from privilege modes less privileged than M-mode.

Reference Notes

For RV64 harts, the Smstateen extension adds four new 64-bit CSRs at machine level: `mstateen0` (Machine State
Enable 0), `mstateen1`, `mstateen2`, and `mstateen3`. For RV32, the registers listed above are 32-bit, and for the
machine-level CSRs there is a corresponding set of high-half CSRs for the upper 32 bits of each register:
`mstateen0h`, `mstateen1h`, `mstateen2h`, `mstateen3h`.