Explorar o código

fix(prototyper): set mpp when delegate (#25)

Signed-off-by: Woshiluo Luo <woshiluo.luo@outlook.com>
Woshiluo Luo hai 5 meses
pai
achega
1bb010cae7
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      prototyper/src/sbi/trap.rs

+ 1 - 0
prototyper/src/sbi/trap.rs

@@ -443,6 +443,7 @@ fn delegate() {
         } else {
             sstatus::set_spp(sstatus::SPP::User);
         }
+        mstatus::set_mpp(mstatus::MPP::Supervisor);
         mepc::write(stvec::read().address());
     }
 }