From 3e8fbbaabdad74e8e992c383fa1e873464dea003 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 22 Jan 2023 01:08:00 +0200 Subject: [PATCH] Kernel: Fix small typos in IDT --- kernel/arch/i386/IDT.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/arch/i386/IDT.cpp b/kernel/arch/i386/IDT.cpp index e213709a65..765a93a3d2 100644 --- a/kernel/arch/i386/IDT.cpp +++ b/kernel/arch/i386/IDT.cpp @@ -35,7 +35,7 @@ struct IDTR static IDTR s_idtr; static GateDescriptor s_idt[0x100]; -static void (*s_irq_handlers[0xFF])() { nullptr }; +static void (*s_irq_handlers[0x100])() { nullptr }; #define INTERRUPT_HANDLER____(i, msg) \ static void interrupt ## i () \ @@ -53,7 +53,7 @@ static void (*s_irq_handlers[0xFF])() { nullptr }; Kernel::Panic("Register dump\r\n" \ "eax=0x{8H}, ebx=0x{8H}, ecx=0x{8H}, edx=0x{8H}\r\n" \ "esp=0x{8H}, ebp=0x{8H}\r\n" \ - "CR0=0x{8H} CR2=0x{8H} CR3=0x{8H} CR4=0x{8H}\r\n", \ + "CR0=0x{8H}, CR2=0x{8H}, CR3=0x{8H}, CR4=0x{8H}\r\n", \ msg, \ eax, ebx, ecx, edx, esp, ebp, cr0, cr2, cr3, cr4); \ } @@ -76,7 +76,7 @@ static void (*s_irq_handlers[0xFF])() { nullptr }; Kernel::Panic("Register dump\r\n" \ "eax=0x{8H}, ebx=0x{8H}, ecx=0x{8H}, edx=0x{8H}\r\n" \ "esp=0x{8H}, ebp=0x{8H}\r\n" \ - "CR0=0x{8H} CR2=0x{8H} CR3=0x{8H} CR4=0x{8H}\r\n" \ + "CR0=0x{8H}, CR2=0x{8H}, CR3=0x{8H}, CR4=0x{8H}\r\n" \ msg " (error code: 0x{8H})", \ eax, ebx, ecx, edx, esp, ebp, cr0, cr2, cr3, cr4, error_code); \ } @@ -192,7 +192,7 @@ namespace IDT void initialize() { s_idtr.offset = s_idt; - s_idtr.size = sizeof(s_idt); + s_idtr.size = sizeof(s_idt) - 1; for (uint8_t i = 0xFF; i > IRQ_VECTOR_BASE; i--) register_irq_handler(i, nullptr);