mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
Interrupts: Handle spurious IRQs from eoi() method
This commit is contained in:
parent
8d9b6c57b5
commit
5f579904c1
2 changed files with 8 additions and 3 deletions
|
@ -137,8 +137,13 @@ void PIC::eoi(const GenericInterruptHandler& handler) const
|
|||
{
|
||||
InterruptDisabler disabler;
|
||||
ASSERT(!is_hard_disabled());
|
||||
ASSERT(handler.interrupt_number() >= gsi_base() && handler.interrupt_number() < interrupt_vectors_count());
|
||||
eoi_interrupt(handler.interrupt_number());
|
||||
u8 irq = handler.interrupt_number();
|
||||
ASSERT(irq >= gsi_base() && irq < interrupt_vectors_count());
|
||||
if ((1 << irq) & m_cached_irq_mask) {
|
||||
spurious_eoi(handler);
|
||||
return;
|
||||
}
|
||||
eoi_interrupt(irq);
|
||||
}
|
||||
|
||||
void PIC::eoi_interrupt(u8 irq) const
|
||||
|
|
|
@ -44,7 +44,7 @@ void SpuriousInterruptHandler::unregister_handler(GenericInterruptHandler&)
|
|||
bool SpuriousInterruptHandler::eoi()
|
||||
{
|
||||
// FIXME: Actually check if IRQ7 or IRQ15 are spurious, and if not, call EOI with the correct interrupt number.
|
||||
m_responsible_irq_controller->spurious_eoi(*this);
|
||||
m_responsible_irq_controller->eoi(*this);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue