From 7ffcc99755dc537ae85d0a29669369281d612fda Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Fri, 3 Nov 2017 02:20:42 +0000 Subject: [PATCH] Add file "arch/exception.h" --- arch/exception.h | 37 +++++++++++++++++++++++++++++++++++++ arch/protected.c | 34 +--------------------------------- 2 files changed, 38 insertions(+), 33 deletions(-) create mode 100644 arch/exception.h diff --git a/arch/exception.h b/arch/exception.h new file mode 100644 index 0000000..abbb4af --- /dev/null +++ b/arch/exception.h @@ -0,0 +1,37 @@ +#ifndef KERNELMQ_INCLUDED_EXCEPTION +#define KERNELMQ_INCLUDED_EXCEPTION 1 + +void isr0(); +void isr1(); +void isr2(); +void isr3(); +void isr4(); +void isr5(); +void isr6(); +void isr7(); +void isr8(); +void isr9(); +void isr10(); +void isr11(); +void isr12(); +void isr13(); +void isr14(); +void isr15(); +void isr16(); +void isr17(); +void isr18(); +void isr19(); +void isr20(); +void isr21(); +void isr22(); +void isr23(); +void isr24(); +void isr25(); +void isr26(); +void isr27(); +void isr28(); +void isr29(); +void isr30(); +void isr31(); + +#endif diff --git a/arch/protected.c b/arch/protected.c index 48d981a..7cafae5 100644 --- a/arch/protected.c +++ b/arch/protected.c @@ -2,6 +2,7 @@ #include "config.h" #include "logger.h" +#include "exception.h" struct GdtPointer { unsigned short limit; @@ -47,39 +48,6 @@ static void idt_set_gate(unsigned char num, unsigned int base, unsigned short se void gdt_flush(const struct GdtPointer *pointer); void idt_flush(const struct IdtPointer *pointer); -void isr0(); -void isr1(); -void isr2(); -void isr3(); -void isr4(); -void isr5(); -void isr6(); -void isr7(); -void isr8(); -void isr9(); -void isr10(); -void isr11(); -void isr12(); -void isr13(); -void isr14(); -void isr15(); -void isr16(); -void isr17(); -void isr18(); -void isr19(); -void isr20(); -void isr21(); -void isr22(); -void isr23(); -void isr24(); -void isr25(); -void isr26(); -void isr27(); -void isr28(); -void isr29(); -void isr30(); -void isr31(); - void protected_initialize() { logger_info("Setup GDT.");