no longer show normal page fault

master
WangRunji 6 years ago
parent ef75c8a072
commit 5478b9ba7b

@ -136,13 +136,10 @@ fn illegal_inst(tf: &mut TrapFrame) {
* process page fault exception
*/
fn page_fault(tf: &mut TrapFrame) {
let addr: usize;
// move stval(i.e. sbadaddr) to addr
addr = stval::read();
error!("\nEXCEPTION: Page Fault @ {:#x}", addr);
let addr = stval::read();
trace!("\nEXCEPTION: Page Fault @ {:#x}", addr);
use memory::page_fault_handler;
if !page_fault_handler(addr) {
if !::memory::page_fault_handler(addr) {
::trap::error(tf);
}
}

@ -111,13 +111,11 @@ fn double_fault(tf: &TrapFrame) {
fn page_fault(tf: &mut TrapFrame) {
let addr: usize;
unsafe { asm!("mov %cr2, $0" : "=r" (addr)); }
error!("\nEXCEPTION: Page Fault @ {:#x}, code: {:#x}", addr, tf.error_code);
use memory::page_fault_handler;
if page_fault_handler(addr) {
if ::memory::page_fault_handler(addr) {
return;
}
error!("\nEXCEPTION: Page Fault @ {:#x}, code: {:#x}", addr, tf.error_code);
error(tf);
}

Loading…
Cancel
Save