From e472fbf564a8dee7ec4cb03b3e77a213a017bc76 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Mon, 27 May 2024 14:24:19 -0500 Subject: 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 --- arch/i386/kernel/idt.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'arch/i386/kernel/idt.c') 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 #include #include -#include #include -#include #include +#include +#include #include __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"); -- cgit v1.2.3