made the jump to ring 3
This commit is contained in:
@@ -49,13 +49,13 @@ void common_interrupt_handler(struct registers *args) {
|
||||
uint32_t faulting_address;
|
||||
asm volatile("mov %%cr2, %0" : "=r"(faulting_address));
|
||||
kprintf("\n--- PAGE FAULT ---\n");
|
||||
kprintf("Faulting Virtual Address (CR2): 0x%x\n", faulting_address);
|
||||
kprintf("Faulted Virtual Address: 0x%x\n", faulting_address);
|
||||
kprintf("Error Code: 0x%x\n", args->error_code);
|
||||
kprintf("Instruction Pointer (EIP): 0x%x\n", args->eip);
|
||||
kprintf("Instruction Pointer: 0x%x\n", args->eip);
|
||||
kprintf("Caused by: %s, %s, running in %s mode\n",
|
||||
(args->error_code & 0x01) ? "Page protection violation" : "Non-present page",
|
||||
(args->error_code & 0x02) ? "Write operation" : "Read operation",
|
||||
(args->error_code & 0x04) ? "User (Ring 3)" : "Supervisor (Ring 0)");
|
||||
(args->error_code & 0x01) ? "Protection Violation" : "Page Not Present",
|
||||
(args->error_code & 0x02) ? "Write" : "Read",
|
||||
(args->error_code & 0x04) ? "User" : "Supervisor");
|
||||
while(1);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user