Skip to content

Commit

Permalink
Initialize mstatus[MPP] to M mode
Browse files Browse the repository at this point in the history
This goes away when riscv#397 lands upstream
  • Loading branch information
nwf-msr committed Feb 12, 2024
1 parent 23b1ac9 commit cf541be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions model/riscv_sys_control.sail
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ function init_sys() -> unit = {
mstatus = set_mstatus_UXL(mstatus, misa[MXL]);
mstatus[SD] = 0b0;

mstatus[MPP] = 0b11;

/* set to little-endian mode */
if sizeof(xlen) == 64 then {
mstatus = Mk_Mstatus([mstatus.bits with 37 .. 36 = 0b00])
Expand Down

0 comments on commit cf541be

Please sign in to comment.