mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
un-use the P bit in the page table
prep for re-allocating it to swap
This commit is contained in:
parent
5c3edef519
commit
a1cffed9cd
1 changed files with 3 additions and 6 deletions
|
|
@ -52,7 +52,7 @@ bitflags! {
|
||||||
const A = 0b00_0100_0000;
|
const A = 0b00_0100_0000;
|
||||||
const D = 0b00_1000_0000;
|
const D = 0b00_1000_0000;
|
||||||
const S = 0b01_0000_0000; // Shared page
|
const S = 0b01_0000_0000; // Shared page
|
||||||
const P = 0b10_0000_0000; // Previously writable
|
const P = 0b10_0000_0000; // swaP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -821,11 +821,8 @@ pub fn return_page_inner(
|
||||||
panic!("page wasn't shared in destination space");
|
panic!("page wasn't shared in destination space");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear the `SHARED` and `PREVIOUSLY-WRITABLE` bits, and set the `VALID` bit.
|
// Clear the `SHARED` bit, and set the `VALID` bit.
|
||||||
unsafe {
|
unsafe { dest_entry.write_volatile(dest_entry_value & !(MMUFlags::S).bits() | MMUFlags::VALID.bits()) };
|
||||||
dest_entry
|
|
||||||
.write_volatile(dest_entry_value & !(MMUFlags::S | MMUFlags::P).bits() | MMUFlags::VALID.bits())
|
|
||||||
};
|
|
||||||
unsafe { flush_mmu() };
|
unsafe { flush_mmu() };
|
||||||
|
|
||||||
// Swap back to our previous address space
|
// Swap back to our previous address space
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue