mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
Kernel: Interpret "reserved bit violation" page faults correctly
We don't actually react to these in any meaningful way other than crashing, but let's at least print the correct information. :^)
This commit is contained in:
parent
52deb09382
commit
c22a4301ed
2 changed files with 4 additions and 2 deletions
|
@ -279,10 +279,11 @@ void page_fault_handler(RegisterDump regs)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kprintf("\033[31;1m%s(%u:%u) Unrecoverable page fault, %s%s address %p\033[0m\n",
|
kprintf("\033[31;1m%s(%u:%u) Unrecoverable page fault, %s%s%s address %p\033[0m\n",
|
||||||
current->process().name().characters(),
|
current->process().name().characters(),
|
||||||
current->pid(),
|
current->pid(),
|
||||||
current->tid(),
|
current->tid(),
|
||||||
|
regs.exception_code & PageFaultFlags::ReservedBitViolation ? "reserved bit violation / " : "",
|
||||||
regs.exception_code & PageFaultFlags::InstructionFetch ? "instruction fetch / " : "",
|
regs.exception_code & PageFaultFlags::InstructionFetch ? "instruction fetch / " : "",
|
||||||
regs.exception_code & PageFaultFlags::Write ? "write to" : "read from",
|
regs.exception_code & PageFaultFlags::Write ? "write to" : "read from",
|
||||||
fault_address);
|
fault_address);
|
||||||
|
|
|
@ -348,7 +348,8 @@ struct PageFaultFlags {
|
||||||
Write = 0x02,
|
Write = 0x02,
|
||||||
UserMode = 0x04,
|
UserMode = 0x04,
|
||||||
SupervisorMode = 0x00,
|
SupervisorMode = 0x00,
|
||||||
InstructionFetch = 0x08,
|
ReservedBitViolation = 0x08,
|
||||||
|
InstructionFetch = 0x10,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue