Skip to content

Commit

Permalink
Remove privilege mode assert
Browse files Browse the repository at this point in the history
This doesn't make sense: I suspect the NExt stuff was added more
recently, but means that you can definitely be in User mode when
reaching this code
  • Loading branch information
PeterRugg committed Sep 4, 2024
1 parent c708cca commit b2f55fa
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion model/riscv_sys_control.sail
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ function dispatchInterrupt(priv : Privilege) -> option((InterruptType, Privilege
* Absence of U-mode implies absence of S-mode.
*/
if (~ (haveUsrMode())) | ((~ (haveSupMode())) & (~ (haveNExt()))) then {
assert(priv == Machine, "invalid current privilege");
let enabled_pending = mip.bits() & mie.bits();
match findPendingInterrupt(enabled_pending) {
Some(i) => let r = (i, Machine) in Some(r),
Expand Down

0 comments on commit b2f55fa

Please sign in to comment.