← Home

mstateen0h

Upper 32 bits of Machine State Enable 0 Register

Address: 0x31C (796) · Privilege: M · Length: 32 · Writable · Defined by: RV32 and Smstateen

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`.

Fields

31:2423:1615:87:0
SE0ENVCFG—CSRINDAIAIMSICCONTEXTP1P13SRMCFGCTR—
BitsFieldAliasDescriptionTypeReset
[31]SE0mstateen0.SE0The SE0 bit in `mstateen0h` controls access to the `hstateen0`, `hstateen0h`, and the `sstateen0` CSRs.RW0
[30]ENVCFGmstateen0.ENVCFGThe ENVCFG bit in `mstateen0h` controls access to the `henvcfg`, `henvcfgh`, and the `senvcfg` CSRs.RW0
[28]CSRINDmstateen0.CSRINDThe CSRIND bit in `mstateen0h` controls access to the `siselect`, `sireg*`, `vsiselect`, and the `vsireg*` CSRs provided by the Sscsrind extensions.RW0
[27]AIAmstateen0.AIAThe 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.RW0
[26]IMSICmstateen0.IMSICThe IMSIC bit in `mstateen0h` controls access to the IMSIC state, including CSRs `stopei` and `vstopei`, provided by the Ssaia extension.RW0
[25]CONTEXTmstateen0.CONTEXTThe CONTEXT bit in `mstateen0h` controls access to the `scontext` and `hcontext` CSRs provided by the Sdtrig extension.RW0
[24]P1P13mstateen0.P1P13The P1P13 bit in `mstateen0h` controls access to the `hedelegh` introduced by Privileged Specification Version 1.13.RW0
[23]SRMCFGmstateen0.SRMCFGThe SRMCFG bit in `mstateen0h` controls access to the `srmcfg`` CSR introduced by the Ssqosid Chapter 18 extension.RW0
[22]CTRmstateen0.CTRWhen Smstateen is implemented, the `mstateen0.CTR` bit controls access to CTR register state from privilege modes less privileged than M-mode.RW0

Software read

return $bits(CSR[mstateen0])[63:32];

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.