mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
kernel: debug: add "check memory" command
This command ensures memory is all owned by the correct process and is unique in its ownership. It takes a long time to run, so ensure the watchdog timer is disabled. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
e44d009b84
commit
b95d442e20
1 changed files with 10 additions and 0 deletions
|
|
@ -100,6 +100,14 @@ fn handle_character(b: u8) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#[cfg(all(baremetal, target_arch = "riscv32"))]
|
||||||
|
b'k' => {
|
||||||
|
println!("Checking RAM for duplicate pages (this will take a few minutes)");
|
||||||
|
crate::mem::MemoryManager::with(|mm| {
|
||||||
|
mm.check_for_duplicates();
|
||||||
|
});
|
||||||
|
println!("Check complete");
|
||||||
|
}
|
||||||
b'm' => {
|
b'm' => {
|
||||||
println!("Printing memory page tables");
|
println!("Printing memory page tables");
|
||||||
crate::services::SystemServices::with(|system_services| {
|
crate::services::SystemServices::with(|system_services| {
|
||||||
|
|
@ -228,6 +236,8 @@ fn print_help() {
|
||||||
println!("--- + -----------------------");
|
println!("--- + -----------------------");
|
||||||
println!(" h | print this message");
|
println!(" h | print this message");
|
||||||
println!(" i | print irq handlers");
|
println!(" i | print irq handlers");
|
||||||
|
#[cfg(all(baremetal, target_arch = "riscv32"))]
|
||||||
|
println!(" k | check RAM to make sure pages are unique");
|
||||||
println!(" m | print MMU page tables of all processes");
|
println!(" m | print MMU page tables of all processes");
|
||||||
println!(" p | print all processes");
|
println!(" p | print all processes");
|
||||||
println!(" P | print all processes and threads");
|
println!(" P | print all processes and threads");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue