mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +00:00
Kernel: Abstract IRQ controller handling from Interrupt handlers
Now we don't send raw numbers, but we let the IRQController object to figure out the correct IRQ number. This helps in a situation when we have 2 or more IOAPICs, so if IOAPIC 1 is assigned for IRQs 0-23 and IOAPIC 2 is assigned for IRQs 24-47, if an IRQHandler of IRQ 25 invokes disable() for example, it will call his responsible IRQController (IOAPIC 2), and the IRQController will subtract the IRQ number with his assigned offset, and the result is that the second redirection entry in IOAPIC 2 will be masked.
This commit is contained in:
parent
666990fbcb
commit
f86be46c98
11 changed files with 97 additions and 45 deletions
|
@ -114,7 +114,7 @@ RefPtr<IRQController> InterruptManagement::get_responsible_irq_controller(u8 int
|
|||
return m_interrupt_controllers[0];
|
||||
}
|
||||
for (auto irq_controller : m_interrupt_controllers) {
|
||||
if (irq_controller->get_gsi_base() <= interrupt_vector)
|
||||
if (irq_controller->gsi_base() <= interrupt_vector)
|
||||
if (!irq_controller->is_hard_disabled())
|
||||
return irq_controller;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue