mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
make valid bit mapping symbolic instead of hard coded constant
This commit is contained in:
parent
bc91055307
commit
daf4d9a93e
1 changed files with 1 additions and 1 deletions
|
|
@ -658,7 +658,7 @@ pub fn pagetable_entry(addr: usize) -> Result<*mut usize, xous_kernel::Error> {
|
||||||
|
|
||||||
let l1_pt = unsafe { &(*(PAGE_TABLE_ROOT_OFFSET as *mut RootPageTable)) };
|
let l1_pt = unsafe { &(*(PAGE_TABLE_ROOT_OFFSET as *mut RootPageTable)) };
|
||||||
let l1_pte = l1_pt.entries[vpn1];
|
let l1_pte = l1_pt.entries[vpn1];
|
||||||
if l1_pte & 1 == 0 {
|
if l1_pte & MMUFlags::VALID.bits() == 0 {
|
||||||
return Err(xous_kernel::Error::BadAddress);
|
return Err(xous_kernel::Error::BadAddress);
|
||||||
}
|
}
|
||||||
Ok((PAGE_TABLE_OFFSET + vpn1 * PAGE_SIZE + vpn0 * 4) as *mut usize)
|
Ok((PAGE_TABLE_OFFSET + vpn1 * PAGE_SIZE + vpn0 * 4) as *mut usize)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue