From cc360c59398f3ca33475e517c359de21c7a1b4d5 Mon Sep 17 00:00:00 2001 From: CHatingPython Date: Tue, 20 Oct 2026 16:08:36 +0200 Subject: [PATCH] fix: interrupts --- kernel/arch/x86_64/int.cpp | 2 +- kernel/arch/x86_64/pit.hpp | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/arch/x86_64/int.cpp b/kernel/arch/x86_64/int.cpp index 0b5b143..a57bb98 100644 --- a/kernel/arch/x86_64/int.cpp +++ b/kernel/arch/x86_64/int.cpp @@ -22,7 +22,7 @@ irq_manager::irq_manager(vm& vm) } irq_t irq_manager::allocate() { - auto* entry = at(m_count + 1); + auto* entry = at(m_count); if (entry == nullptr) { page* newPage = m_vm->allocate(); if (newPage == nullptr) return INVALID_IRQ; diff --git a/kernel/arch/x86_64/pit.hpp b/kernel/arch/x86_64/pit.hpp index 5a194b6..16fa8ff 100644 --- a/kernel/arch/x86_64/pit.hpp +++ b/kernel/arch/x86_64/pit.hpp @@ -4,7 +4,6 @@ #include "arch/x86_64/int.hpp" #include "arch/x86_64/io.hpp" #include "types.hpp" -#include "vga.hpp" namespace x86_64 { @@ -25,8 +24,6 @@ struct pit { pit* pit = reinterpret_cast(data); ++pit->ticks; - - vga::puts("PIT called!", 0, 5); } volatile u64 ticks = 0;