You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Executing SRET in Lower-Privilege Mode Does Not Raise an Exception #251
An xRET instruction can be executed in
privilege mode x or higher, where executing a lower-privilege xRET instruction will pop the relevant
lower-privilege interrupt enable and privilege mode stack. Attempting to execute an xRET instruction in
a mode less privileged than x will raise an illegal-instruction exception. In addition to manipulating the
privilege stack as described in Section 3.1.6.1, xRET sets the pc to the value stored in the xepc register.
However, NutShell executes the SRET instruction in U-mode without raising an illegal-instruction exception, which violates the RISC-V privileged specification and also differs from the behavior of the Spike reference model.
Activity