mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 09:45:19 +08:00
chore: kernel: trap: print trace when page fault happens
This commit is contained in:
parent
d69e95721c
commit
a9772cba54
@ -93,6 +93,10 @@ impl TrapContextOps for TrapContext {
|
||||
if from_kernel {
|
||||
panic_fatal!("Page Fault in Kernel");
|
||||
}
|
||||
|
||||
let stval = riscv::register::stval::read();
|
||||
trace!("Page Fault: sepc: {:#x}, stval: {:#x}", self.sepc, stval);
|
||||
|
||||
// TODO: handle page fault
|
||||
},
|
||||
_ => panic_fatal!("Unhandled Trap"),
|
||||
|
Loading…
Reference in New Issue
Block a user