From d354cccd37c584b0a8580eb9ffba2fa64bbefc4d Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 18 Jun 2023 23:24:27 +0300 Subject: [PATCH] Kernel: Add enum for ISR name to number --- kernel/arch/x86_64/IDT.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/kernel/arch/x86_64/IDT.cpp b/kernel/arch/x86_64/IDT.cpp index 6fbff308..76a9f533 100644 --- a/kernel/arch/x86_64/IDT.cpp +++ b/kernel/arch/x86_64/IDT.cpp @@ -63,6 +63,42 @@ namespace IDT static void(*s_irq_handlers[0x10])() { nullptr }; + enum ISR + { + DivisionError, + Debug, + NonMaskableInterrupt, + Breakpoint, + Overflow, + BoundRangeException, + InvalidOpcode, + DeviceNotAvailable, + DoubleFault, + CoprocessorSegmentOverrun, + InvalidTSS, + SegmentNotPresent, + StackSegmentFault, + GeneralProtectionFault, + PageFault, + UnknownException0x0F, + x87FloatingPointException, + AlignmentCheck, + MachineCheck, + SIMDFloatingPointException, + VirtualizationException, + ControlProtectionException, + UnknownException0x16, + UnknownException0x17, + UnknownException0x18, + UnknownException0x19, + UnknownException0x1A, + UnknownException0x1B, + HypervisorInjectionException, + VMMCommunicationException, + SecurityException, + UnkownException0x1F, + }; + static const char* isr_exceptions[] = { "Division Error",