mstatush

Machine Status High

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

Attributes

Defining Extension * Sm, version >= 1.12

CSR Address

0x310

Length

32-bit

Privilege Mode

M

Format

mstatush format
Figure 1. mstatush format

Field Summary

Name Location Type Reset Value

mstatush.MPV

7

RW-H

UNDEFINED_LEGAL

mstatush.GVA

6

RW-H

0

mstatush.MBE

5

[when,"M_MODE_ENDIANESS == "dynamic""] RW

[when,"M_MODE_ENDIANESS != "dynamic""] RO

[when,"M_MODE_ENDIANESS == "big""] 1

[when,"M_MODE_ENDIANESS != "big""] 0

mstatush.SBE

4

[when,"S_MODE_ENDIANESS == "dynamic""] RW

[when,"S_MODE_ENDIANESS != "dynamic""] RO

[when,"(S_MODE_ENDIANESS == "little")"] 0 [when,"(S_MODE_ENDIANESS == "big")"] 1 [when,"else"] UNDEFINED_LEGAL

Fields

MPV

Location

7

Description

Machine Previous Virtualization mode

Written with the prior virtualization mode when entering M-mode from an exception/interrupt. When returning via an MRET instruction, the virtualization mode becomes the value of MPV unless MPP=3, in which case the virtualization mode is always 0. Can also be written by software.

Type

RW-H

Reset value

UNDEFINED_LEGAL

GVA

Location

6

Description

Guest Virtual Address

When a trap is taken and a guest virtual address is written into mtval, GVA is set. When a trap is taken and a guest virtual address is written into mtval, GVA is cleared.

Type

RW-H

Reset value

0

MBE

Location

5

Description

see mstatus.MBE

Type
RW
RO
Reset value
1
0

SBE

Location

4

Description

see mstatus.SBE

Type
RW
RO
Reset value
0
1
UNDEFINED_LEGAL