kernel: flush MMU when we rotate the SATP value

Signed-off-by: Sean <xobs@ci.betrusted.io>
This commit is contained in:
Sean 2020-10-04 18:12:27 +08:00
parent ba320184b0
commit bbab52be7f

View file

@ -111,7 +111,9 @@ impl MemoryMapping {
/// As such, this will only have an observable effect once code returns
/// to userspace.
pub fn activate(self) -> Result<(), xous_kernel::Error> {
unsafe { flush_mmu() };
satp::write(self.satp);
unsafe { flush_mmu() };
Ok(())
}