Selaa lähdekoodia

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

Signed-off-by: Woshiluo Luo <woshiluo.luo@outlook.com>
Woshiluo Luo 5 kuukautta sitten
vanhempi
commit
1bb010cae7
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  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());
     }
 }