diff --git a/kernel/arch/x86_64/arch.cpp b/kernel/arch/x86_64/arch.cpp index 700acc2..96bd38f 100644 --- a/kernel/arch/x86_64/arch.cpp +++ b/kernel/arch/x86_64/arch.cpp @@ -26,8 +26,6 @@ void arch::init() { static constexpr hwirq_t PIT_HWIRQ = 0x00; - m_picController.enable(PIT_HWIRQ); - irq_t pitIrq = m_irqManager.allocate(); m_irqManager.bind(pitIrq, m_picController, PIT_HWIRQ, 0x20); m_irqManager.register_handler(pitIrq, pit::handler, &m_pit); diff --git a/kernel/arch/x86_64/int.cpp b/kernel/arch/x86_64/int.cpp index a57bb98..cef10c4 100644 --- a/kernel/arch/x86_64/int.cpp +++ b/kernel/arch/x86_64/int.cpp @@ -64,6 +64,7 @@ bool irq_manager::enable(irq_t irq) { auto* entry = at(irq); if (entry == nullptr) return false; entry->enabled = true; + entry->controller->enable(entry->hwirq); return true; } @@ -71,6 +72,7 @@ bool irq_manager::disable(irq_t irq) { auto* entry = at(irq); if (entry == nullptr) return false; entry->enabled = false; + entry->controller->disable(entry->hwirq); return true; }