diff options
Diffstat (limited to 'src/arch/amd64/idt.c')
-rw-r--r-- | src/arch/amd64/idt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/amd64/idt.c b/src/arch/amd64/idt.c index b4a11bb..583b8a9 100644 --- a/src/arch/amd64/idt.c +++ b/src/arch/amd64/idt.c @@ -53,8 +53,8 @@ void idt_init(void) { idtr.size = (uint16_t)sizeof(struct idt_entry) * IDT_SIZE - 1; // initialize idt - for(size_t vector = 0; vector < IDT_SIZE; vector++) { - struct idt_entry* entry = &idt[vector]; + for (size_t vector = 0; vector < IDT_SIZE; vector++) { + struct idt_entry *entry = &idt[vector]; uint64_t isr = (uint64_t)isr_stub_table[vector]; // interrupts before 0x20 are for cpu exceptions @@ -120,7 +120,7 @@ void idt_exception_handler(uint64_t exception, uint64_t code, void *rip, void *r strcat(msg, buf); // page faults store the offending address in cr2 - if(exception == 0x0E) { + if (exception == 0x0E) { strcat(msg, "\nPage fault address: 0x"); void *addr; __asm__ volatile ("mov %%cr2, %0" : "=r"(addr)); |