kernel: riscv: invert shared logic

This logic was backwards.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-02-17 17:28:49 +08:00
parent e9a1da25b0
commit b6a28a85fc

View file

@ -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 l0_pt.entries[vpn0] & MMUFlags::S.bits() == 0 {
if l0_pt.entries[vpn0] & MMUFlags::S.bits() == 1 {
return Err(xous_kernel::Error::ShareViolation);
}