← Home

mnstatus

Machine NMI Status

Address: 0x744 (1860) · Privilege: M · Length: MXLEN · Writable · Defined by: Smrnmi

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

Fields

RV32

31:2423:1615:87:0
—MNPP—MNPELP—MNPV—NMIE—

RV64

63:5655:4847:4039:3231:2423:1615:87:0
—MNPP—MNPELP—MNPV—NMIE—
BitsFieldAliasDescriptionTypeReset
[12:11]MNPPM-mode NMI Previous Privilege. Written by hardware in two cases: * Written with the prior nominal privilege level when entering M-mode NMI from an exception/interrupt. * Written with 0 when executing an `mnret` instruction to return from a double exception / NMI in M-mode. Can also be written by software without immediate side-effect. Affects execution in two cases: * On a return from a double exception / NMI from M-mode, the machine will enter the privilege level stored in MNPP before clearing the field. * When `mnstatus.MNPRV` is set, loads and stores behave as if the current privilege level were MNPP.RW-HUNDEFINED_LEGAL
[9]MNPELPM-mode NMI Previous Expected Landing Pad state. Defined by the Zicfilp extension. Holds the previous Expected Landing Pad (ELP) state when entering M-mode NMI.RW-HUNDEFINED_LEGAL
[7]MNPV*Machine Previous NMI 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.RW-HUNDEFINED_LEGAL
[3]NMIE*M-mode NMI Enable* Written by hardware in two cases: * Written with the value 0 when entering M-mode NMI. * Written with the value 0 when entering M-mode double trap. Written by software in one case only: * The NMIE is 0 on reset for boot code to initialize system to service NMIs. Once SW writes NMIE to 1, it cannot be changed anymore by SW. Affects execution by: * When 0, all non-maskable interrupts and exceptions are disabled when the current privilege level is M. * When 1, NMI or double trap is possible.RW-H0

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.