diff options
author | Danny Holman <dholman@gymli.org> | 2024-05-27 14:24:19 -0500 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2024-05-27 14:24:19 -0500 |
commit | e472fbf564a8dee7ec4cb03b3e77a213a017bc76 (patch) | |
tree | 02cdbf5930774478ec32b64759dca7df4d8ee3cc /arch/i386/kernel/idt.c | |
parent | d5e63951bdf8c154bafee11c84816539fde77b81 (diff) |
arch: i386: update all files to use the new libk
Update all the files under arch to make use of the new libk
implementation. Most of these changes are simply path changes in include
directives.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/kernel/idt.c')
-rw-r--r-- | arch/i386/kernel/idt.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/i386/kernel/idt.c b/arch/i386/kernel/idt.c index 5c0766c..1a06631 100644 --- a/arch/i386/kernel/idt.c +++ b/arch/i386/kernel/idt.c @@ -3,10 +3,10 @@ #include <kernel/panic.h> #include <kernel/gdt.h> #include <kernel/asm.h> -#include <kernel/io.h> #include <kernel/pic.h> -#include <kernel/string.h> #include <kernel/paging.h> +#include <libk/io.h> +#include <libk/string.h> #include <stdint.h> __attribute__((aligned(0x10))) @@ -45,8 +45,8 @@ const char* exceptions[] = { "RESERVED" }; -void exception_handler(struct regs *regs) { - switch (regs->isr_vector) { +void exception_handler(struct isr_frame *frame) { + switch (frame->isr_vector) { case 0x00: panic("Division by zero in kernel address space"); break; @@ -60,22 +60,22 @@ void exception_handler(struct regs *regs) { panic("Protection fault in kernel address space"); break; case 0x0E: - page_fault_handler(regs); + page_fault_handler(frame); break; default: panic("Unhandled exception"); } } -void interrupt_handler(struct regs regs) { - if (regs.isr_vector < 32) { - exception_handler(®s); - } else if (regs.isr_vector < 48) { - irq_dispatch(®s); +void interrupt_handler(struct isr_frame frame) { + if (frame.isr_vector < 32) { + exception_handler(&frame); + } else if (frame.isr_vector < 48) { + irq_dispatch(&frame); } else { - switch (regs.isr_vector) { + switch (frame.isr_vector) { case 0x80: - handle_syscall(®s); + handle_syscall(&frame); break; default: panic("Unmapped interrupt"); |