mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
swapper needs write privs to the lent page
encryption is in-place to save on memory
This commit is contained in:
parent
b2b31a2713
commit
0fca04f14e
1 changed files with 8 additions and 1 deletions
|
|
@ -1141,7 +1141,14 @@ pub fn evict_page_inner(target_pid: PID, vaddr: usize) -> Result<usize, xous_ker
|
|||
.find_virtual_address(core::ptr::null_mut(), PAGE_SIZE, xous_kernel::MemoryType::Messages)
|
||||
.expect("couldn't find virtual address in swapper space for target page")
|
||||
as usize;
|
||||
let _result = map_page_inner(mm, swapper_pid, target_paddr, payload_virt, MemoryFlags::R, true);
|
||||
let _result = map_page_inner(
|
||||
mm,
|
||||
swapper_pid,
|
||||
target_paddr,
|
||||
payload_virt,
|
||||
MemoryFlags::R | MemoryFlags::W, // write flag needed because encryption is in-place
|
||||
true,
|
||||
);
|
||||
unsafe { flush_mmu() };
|
||||
payload_virt
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue