1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

Kernel: Allow to install a real IRQ handler on a spurious one

IRQ 7 and 15 on the PIC architecture are used for spurious interrupts.
IRQ 7 could also be used for LPT connection, and IRQ 15 can be used for
the secondary IDE channel. Therefore, we need to allow to install a
real IRQ handler and check if a real IRQ was asserted. If so, we handle
them in the usual way.

A note on this fix - unregistering or registering a new IRQ handler
after we already registered one in the spurious interrupt handler is
not supported yet.
This commit is contained in:
Liav A 2020-12-19 08:49:15 +02:00 committed by Andreas Kling
parent cf0a12c68f
commit 39c1783387
3 changed files with 25 additions and 5 deletions

View file

@ -58,6 +58,7 @@ private:
void disable_interrupt_vector();
explicit SpuriousInterruptHandler(u8 interrupt_number);
bool m_enabled;
bool m_real_irq { false };
RefPtr<IRQController> m_responsible_irq_controller;
OwnPtr<GenericInterruptHandler> m_real_handler;
};