Skip to content

Commit

Permalink
Merge pull request riscv#993 from riscv/rnmi-exception
Browse files Browse the repository at this point in the history
Smrnmi fixes
  • Loading branch information
kasanovic authored Mar 18, 2023
2 parents 8b9047d + b7d0102 commit faa77da
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/rnmi.tex
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ \section{MNRET Instruction}
{\tt mnstatus} to return to the program counter, privilege mode,
and virtualization mode of the interrupted context.
This instruction also sets {\tt mnstatus}.NMIE.
If MNRET changes the privilege mode to a mode
less privileged than M, it also sets {\tt mstatus}.MPRV to 0.

\section{RNMI Operation}

Expand All @@ -220,8 +222,9 @@ \section{RNMI Operation}
from {\tt mnstatus}, and also sets {\tt mnstatus}.NMIE, which
re-enables interrupts.

If the hart encounters an exception while the {\tt mnstatus}.NMIE bit is
clear, the actions taken are the same as if the exception had occurred while
If the hart encounters an exception while executing in M-mode
with the {\tt mnstatus}.NMIE bit clear,
the actions taken are the same as if the exception had occurred while
{\tt mnstatus}.NMIE were set, except that the program counter is set to the
RNMI exception trap handler address (rather than the address specified by
{\tt mtvec}).
Expand Down

0 comments on commit faa77da

Please sign in to comment.