Add a page fault handler
This commit is contained in:
parent
0b7e667368
commit
747c2a4e17
|
@ -44,9 +44,13 @@ extern "C" void interrupt_divide_by_zero(void* frame) { panic("DIV0"); }
|
|||
extern "C" void isr_protection_fault();
|
||||
extern "C" void interrupt_protection_fault(void* frame) { panic("GP"); }
|
||||
|
||||
extern "C" void isr_page_fault();
|
||||
extern "C" void interrupt_page_fault(void* frame) { panic("PF"); }
|
||||
|
||||
void InitIdt() {
|
||||
gIdt[0] = CreateDescriptor(isr_divide_by_zero);
|
||||
gIdt[13] = CreateDescriptor(isr_protection_fault);
|
||||
gIdt[14] = CreateDescriptor(isr_page_fault);
|
||||
InterruptDescriptorTablePointer idtp{
|
||||
.size = sizeof(gIdt),
|
||||
.base = reinterpret_cast<uint64_t>(gIdt),
|
||||
|
|
|
@ -54,3 +54,4 @@ isr_\name:
|
|||
|
||||
isr_handler divide_by_zero
|
||||
isr_handler protection_fault,1
|
||||
isr_handler page_fault,1
|
||||
|
|
Loading…
Reference in New Issue