Skip to content

Commit cf541be

Browse files
committed
Initialize mstatus[MPP] to M mode
This goes away when riscv#397 lands upstream
1 parent 23b1ac9 commit cf541be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

model/riscv_sys_control.sail

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ function init_sys() -> unit = {
505505
mstatus = set_mstatus_UXL(mstatus, misa[MXL]);
506506
mstatus[SD] = 0b0;
507507

508+
mstatus[MPP] = 0b11;
509+
508510
/* set to little-endian mode */
509511
if sizeof(xlen) == 64 then {
510512
mstatus = Mk_Mstatus([mstatus.bits with 37 .. 36 = 0b00])

0 commit comments

Comments
 (0)