Webcentive RISC-V Reference

Smrnmi instructions

Resumable Non-Maskable Interrupts

The base machine-level architecture supports only unresumable non-maskable interrupts (UNMIs), where the NMI jumps to a handler in machine mode, overwriting the current mepc and mcause register values. If the hart had been executing machine-mode code in a trap handler, the previous values in mepc and mcause would not be recoverable and so execution is not generally resumable.

The Smrnmi extension adds support for resumable non-maskable interrupts (RNMIs) to RISC-V. The extension adds four new CSRs (mnepc, mncause, mnstatus, and mnscratch) to hold the interrupted state, and one new instruction, mnret, to resume from the RNMI handler.

Extension description from riscv-unified-db, reformatted.

Specification chapter: The RISC-V Instruction Set Manual, src/priv/smrnmi.adoc.

Instructions (1)

MnemonicName (riscv-unified-db)XLEN
mnretMachine mode resume from the RNMI or Double Trap handlerRV32 and RV64