From 3748dfbe332b517934ded04a762863c9b5ce9509 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Sat, 27 Apr 2019 00:38:47 +0200 Subject: [PATCH] Spurious int --- kaleid/kernel/cpu/idt.c | 22 +++++++++++++++++++++- kaleid/kernel/init/init.c | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/kaleid/kernel/cpu/idt.c b/kaleid/kernel/cpu/idt.c index 6264dfa..90e2936 100644 --- a/kaleid/kernel/cpu/idt.c +++ b/kaleid/kernel/cpu/idt.c @@ -213,6 +213,11 @@ void IsrHandler(ISRFrame_t *regs) if ((!regs) || (!regs->rip)) KeStartPanic("[ISR ?] Unknown ISR Exception Abort\n"); + if ((regs->intNo >= 21) && (regs->intNo <= 31)) + return; // INTEL RESERVED + if (regs->intNo == 15) + return; // INTEL RESERVED + if (regs->intNo < 32) { IdtExceptionHandler(regs); return; @@ -225,7 +230,22 @@ void IsrHandler(ISRFrame_t *regs) } } - KeStartPanic("[ISR 0x%x] Unknown ISR Exception Abort\n", regs->intNo); + bprintf(BStdOut, "[ISR 0x%x] %s\n", regs->intNo, "Unknown ISR Exception"); + /* KeStartPanic("[ISR 0x%x] Unknown ISR Exception Abort\n" */ + /* " Error code : 0x%x\n" */ + /* " RIP:\t\t%p\n" */ + /* " CS:\t\t%p\n" */ + /* " RFLAGS:\t%022b\n" */ + /* " RSP:\t\t%p\n" */ + /* " SS:\t\t%p\n", */ + /* regs->intNo, */ + /* regs->ErrorCode, */ + /* regs->rip, */ + /* regs->cs, */ + /* regs->rflags, */ + /* regs->rsp, */ + /* regs->ss */ + /* ); */ } diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index 90da5e4..55c4cfb 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -91,13 +91,13 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) IoPrintRtcTime(); KernLog("There was %d ticks\n", IoGetRtcTicks()); - for (uint i = 1; i < 2 ; i++) { + for (uint i = 1; i < 200 ; i++) { while (IoGetRtcTicks() < i * 10000) { } IoPrintRtcTime(); } - divideByZero(); + //divideByZero(); KernLog("Goodbye after %d ticks\n", IoGetRtcTicks()); // End this machine's suffering