mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
kernel: riscv: add klog messages to mem.rs
These are useful in tracking down certain violations. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
090354c882
commit
f8309dc580
1 changed files with 4 additions and 2 deletions
|
|
@ -483,13 +483,15 @@ pub fn lend_page_inner(
|
|||
|
||||
// If we try to share a page that's not ours, that's just wrong.
|
||||
if *entry & MMUFlags::VALID.bits() == 0 {
|
||||
return Err(xous_kernel::Error::ShareViolation);
|
||||
// klog!("Not valid");
|
||||
Err(xous_kernel::Error::ShareViolation)?;
|
||||
}
|
||||
|
||||
// If we try to share a page that's already shared, that's a sharing
|
||||
// violation.
|
||||
if *entry & MMUFlags::S.bits() != 0 {
|
||||
return Err(xous_kernel::Error::ShareViolation);
|
||||
// klog!("Already shared");
|
||||
Err(xous_kernel::Error::ShareViolation)?;
|
||||
}
|
||||
|
||||
// Strip the `VALID` flag, and set the `SHARED` flag.
|
||||
|
|
|
|||
Loading…
Reference in a new issue