Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Smrnmi handling #209

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cfi_forward.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,13 @@ at the privilege level the hart was previously in, and the `ELP` is set to
value `y`, then `ELP` is set to the value of `pelp` if `__y__LPE` is 1;
otherwise, it is set to `NO_LP_EXPECTED`.

When the Smrnmi extension is implemented, a `MNPELP` field (bit 9) is provided
in the `mnstatus` CSR to hold the previous `ELP` state on a trap to the RNMI
handler. When a RNMI trap is delivered, the `MNPELP` is set to `ELP` and `ELP`
set to `NO_LP_EXPECTED`. Upon a `MNRET`, if the `mnstatus.MNPP` holds the value
`y`, then `ELP` is set to the value of `MNPELP` if `yLPE` is 1; otherwise, it is
set to `NO_LP_EXPECTED`.

[NOTE]
====
The trap handler in privilege mode `x` must save the `__x__PELP` bit and the
Expand Down
Loading