From c292ef5471a62ca39ce7b29cf692fd1be793bafb Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 16 Nov 2022 20:28:07 +0200 Subject: [PATCH] Improve IDT Kernel panic --- kernel/kernel/IDT.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/kernel/IDT.cpp b/kernel/kernel/IDT.cpp index 941d7f4e01..793fea8828 100644 --- a/kernel/kernel/IDT.cpp +++ b/kernel/kernel/IDT.cpp @@ -13,15 +13,15 @@ static IDTR s_idtr; static GateDescriptor* s_idt; -#define INTERRUPT_HANDLER(i, msg) \ - static void interrupt ## i () \ - { \ - uint32_t cr0, cr2, cr3, cr4; \ - asm volatile("movl %%cr0, %%eax":"=a"(cr0)); \ - asm volatile("movl %%cr2, %%eax":"=a"(cr2)); \ - asm volatile("movl %%cr3, %%eax":"=a"(cr3)); \ - asm volatile("movl %%cr4, %%eax":"=a"(cr4)); \ - Kernel::panic(msg ", CR0={} CR2={} CR3={} CR4={}\n", cr0, cr2, cr3, cr4); \ +#define INTERRUPT_HANDLER(i, msg) \ + static void interrupt ## i () \ + { \ + uint32_t cr0, cr2, cr3, cr4; \ + asm volatile("movl %%cr0, %%eax":"=a"(cr0)); \ + asm volatile("movl %%cr2, %%eax":"=a"(cr2)); \ + asm volatile("movl %%cr3, %%eax":"=a"(cr3)); \ + asm volatile("movl %%cr4, %%eax":"=a"(cr4)); \ + Kernel::panic(msg ", CR0={} CR2={} CR3={} CR4={}", cr0, cr2, cr3, cr4); \ } INTERRUPT_HANDLER(0x00, "Divide error")