ensure security bits are set according to -A1 stepping

in some modes these don't get side-effected elsewhere so make
sure they are set correctly upon entering the next stage
This commit is contained in:
bunnie 2025-11-06 14:08:05 +08:00
parent 664ef0a6c4
commit 2d7ee0c614

View file

@ -160,5 +160,9 @@ impl Coreuser {
// invert sense for Xous mode - User process 3 is trusted, the kernel is not!
self.csr.rmwf(utra::coreuser::CONTROL_INVERT_PRIV, 1);
self.csr.wo(utra::coreuser::PROTECT, 1);
// ensure security bits are set according to A1 stepping
let mut csr = CSR::new(utra::rrc::HW_RRC_BASE as *mut u32);
csr.wo(utra::rrc::SFR_RRCCR, crate::rram::SECURITY_MODE);
}
}