diff --git a/Kernel/Interrupts/InterruptManagement.cpp b/Kernel/Interrupts/InterruptManagement.cpp index 154a1a9ce45..eb539b3de02 100644 --- a/Kernel/Interrupts/InterruptManagement.cpp +++ b/Kernel/Interrupts/InterruptManagement.cpp @@ -81,19 +81,31 @@ Vector> InterruptManagement::isa_overrides( return m_isa_interrupt_overrides; } -u8 InterruptManagement::acquire_mapped_interrupt_number(u8 number) +u8 InterruptManagement::acquire_mapped_interrupt_number(u8 original_irq) { if (!InterruptManagement::initialized()) { // This is necessary, because we install UnhandledInterruptHandlers before we actually initialize the Interrupt Management object... - return number; + return original_irq; } - return InterruptManagement::the().get_mapped_vector_number(number); + return InterruptManagement::the().get_mapped_interrupt_vector(original_irq); } -u8 InterruptManagement::get_mapped_vector_number(u8 original_vector) +u8 InterruptManagement::acquire_irq_number(u8 mapped_interrupt_vector) +{ + ASSERT(InterruptManagement::initialized()); + return InterruptManagement::the().get_irq_vector(mapped_interrupt_vector); +} + +u8 InterruptManagement::get_mapped_interrupt_vector(u8 original_irq) { // FIXME: For SMP configuration (with IOAPICs) use a better routing scheme to make redirections more efficient. - return original_vector; + return original_irq; +} + +u8 InterruptManagement::get_irq_vector(u8 mapped_interrupt_vector) +{ + // FIXME: For SMP configuration (with IOAPICs) use a better routing scheme to make redirections more efficient. + return mapped_interrupt_vector; } RefPtr InterruptManagement::get_responsible_irq_controller(u8 interrupt_vector) diff --git a/Kernel/Interrupts/InterruptManagement.h b/Kernel/Interrupts/InterruptManagement.h index 2f6815795ac..3e3d82fd129 100644 --- a/Kernel/Interrupts/InterruptManagement.h +++ b/Kernel/Interrupts/InterruptManagement.h @@ -47,7 +47,8 @@ public: static InterruptManagement& the(); static void initialize(); static bool initialized(); - static u8 acquire_mapped_interrupt_number(u8); + static u8 acquire_mapped_interrupt_number(u8 original_irq); + static u8 acquire_irq_number(u8 mapped_interrupt_vector); virtual void switch_to_pic_mode(); virtual void switch_to_ioapic_mode(); @@ -57,7 +58,8 @@ public: Vector> isa_overrides(); - u8 get_mapped_vector_number(u8 original_vector); + u8 get_mapped_interrupt_vector(u8 original_irq); + u8 get_irq_vector(u8 mapped_interrupt_vector); void enumerate_interrupt_handlers(Function); IRQController& get_interrupt_controller(int index);