mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
kernel: riscv: really fix sharing logic
We're comparing numbers and not MMUFlags, so invalid values crept in. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
b6a28a85fc
commit
6119c78bc7
1 changed files with 1 additions and 1 deletions
|
|
@ -584,7 +584,7 @@ pub fn virt_to_phys(virt: usize) -> Result<usize, xous_kernel::Error> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the page is "Valid" but shared, issue a sharing violation
|
// If the page is "Valid" but shared, issue a sharing violation
|
||||||
if l0_pt.entries[vpn0] & MMUFlags::S.bits() == 1 {
|
if l0_pt.entries[vpn0] & MMUFlags::S.bits() != 0 {
|
||||||
return Err(xous_kernel::Error::ShareViolation);
|
return Err(xous_kernel::Error::ShareViolation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue