← Home

mstatush

Machine Status High

Address: 0x310 (784) · Privilege: M · Length: 32 · Writable · Defined by: RV32 and Sm (>= 1.12)

The mstatus register tracks and controls the hart's current operating state.

Fields

31:2423:1615:87:0
—MDTMPELP—MPVGVAMBESBE—
BitsFieldAliasDescriptionTypeReset
[10]MDTmstatus.MDTsee `mstatus.MDT`RW-H1
[9]MPELPmstatus.MPELPsee `mstatus.MPELP`RW-HUNDEFINED_LEGAL
[7]MPVmstatus.MPVsee `mstatus.MPV`RW-HUNDEFINED_LEGAL
[6]GVAmstatus.GVAsee `mstatus.GVA`RW-H0
[5]MBEmstatus.MBEsee `mstatus.MBE`
return (M_MODE_ENDIANNESS == "dynamic") ? CsrFieldType::RW : CsrFieldType::RO;
return (M_MODE_ENDIANNESS == "big") ? 1 : 0;
[4]SBEmstatus.SBEsee `mstatus.SBE`
return (S_MODE_ENDIANNESS == "dynamic") ? CsrFieldType::RW : CsrFieldType::RO;
if (S_MODE_ENDIANNESS == "little") {
  return 0;
} else if (S_MODE_ENDIANNESS == "big") {
  return 1;
} else {
  return UNDEFINED_LEGAL;
}

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.