CSR Bit Fields

RISC-V mstateen2h CSR Register

Address 0x31EPrivilege MachineAccess RW / RV32-only high half / 32-bitMachine delegation, environment-configuration, and state-enable CSRs

mstateen2h (0x31E) is the RV32 M-mode high-half CSR for bits 63:32 of mstateen2.

Bit Overview
bit 3 = only bit 3; bits 12..11 = bits 12 down to 11
MSBLSB
Field Map

Understand mstateen2h By Bit Fields

0 key fields
Official Basis & Search Notes

mstateen2h exists only on RV32 as the access window for mstateen2 bits 63:32. Bit 31 maps mstateen2.SE2, letting M-mode control lower-privilege access to matching hstateen2/sstateen2 CSRs.

mstateen2h is the RV32 high-half alias of mstateen2; RV64 uses 64-bit mstateen2 and has no mstateen2h CSR.
A stateen CSR controls access below its own privilege level, not access by that same level.
SE2 is WARL and may be read-only zero only under the official conditions.

What To Check First When Reading This CSR

  • - Only RV32 uses mstateen2h to access bits 63:32 of mstateen2; this high-half CSR does not exist on RV64.
  • - Use address 0x31E and the lowest access privilege (Machine) to decide whether software may read it directly.
  • - Do not infer undefined functions from bit positions when reading WARL, RO0, or WPRI fields; interpret them through the matching full CSR and extension rules.

Risk Checks Before Writing

  • - Preserve WPRI bits and unchanged fields when writing; whether each writable bit is actually writable depends on the corresponding extension and implementation.
  • - Read back WARL fields after writes to confirm the value accepted by the implementation.

Put It Back Into A Real Flow

1

On RV32, read mstateen2h before initializing lower-privilege environment state to observe the upper 32 bits of mstateen2.

2

Modify only target fields and preserve all other bits.

3

When needed, read the CSR back and confirm the effect through later lower-privilege accesses, traps, or state updates.

FAQ

Does mstateen2h exist on RV64?

No. mstateen2h is the RV32 CSR for accessing the upper 32 bits of mstateen2.

Can the low 31 bits of mstateen2h be assigned private meanings?

No. In the current manual, these bits are reserved unless a future standard defines a stateen meaning; undefined reserved bits read as zero.