made pagefault handler more verbose
This commit is contained in:
parent
d289601a0e
commit
95791bb12c
1 changed files with 7 additions and 4 deletions
|
@ -147,10 +147,13 @@ void page_fault_handler(struct state *s)
|
|||
{
|
||||
size_t viraddr = read_cr2();
|
||||
|
||||
kprintf("Page Fault Exception (%d) at cs:ip = %#x:%#lx, address = %#lx\n",
|
||||
s->int_no, s->cs, s->eip, viraddr);
|
||||
|
||||
outportb(0x20, 0x20); /** @todo: do we need this? */
|
||||
kprintf("Page Fault Exception (%d) at cs:ip = %#x:%#lx, task = %u, addr = %#lx, error = %#x [ %s %s %s %s %s ]\n",
|
||||
s->int_no, s->cs, s->eip, current_task->id, viraddr, s->error,
|
||||
(s->error & 0x4) ? "user" : "supervisor",
|
||||
(s->error & 0x10) ? "instruction" : "data",
|
||||
(s->error & 0x2) ? "write" : ((s->error & 0x10) ? "fetch" : "read"),
|
||||
(s->error & 0x1) ? "protection" : "not present",
|
||||
(s->error & 0x8) ? "reserved bit" : "\b");
|
||||
|
||||
while(1) HALT;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue