mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Simplify InterruptManagement::switch_to_pic_mode()
Since switch_to_pic_mode is only called if no IOAPIC is available, there's no need to try and and find it and disable it.
This commit is contained in:
parent
9abbeff79f
commit
6f6211c5e6
Notes:
sideshowbarker
2024-07-17 06:38:42 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/6f6211c5e6 Pull-request: https://github.com/SerenityOS/serenity/pull/15353 Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/supercomputer7 ✅
1 changed files with 2 additions and 9 deletions
|
@ -138,20 +138,13 @@ UNMAP_AFTER_INIT InterruptManagement::InterruptManagement()
|
|||
|
||||
UNMAP_AFTER_INIT void InterruptManagement::switch_to_pic_mode()
|
||||
{
|
||||
VERIFY(m_interrupt_controllers.is_empty());
|
||||
dmesgln("Interrupts: Switch to Legacy PIC mode");
|
||||
InterruptDisabler disabler;
|
||||
m_interrupt_controllers.append(adopt_lock_ref(*new PIC()));
|
||||
SpuriousInterruptHandler::initialize(7);
|
||||
SpuriousInterruptHandler::initialize(15);
|
||||
for (auto& irq_controller : m_interrupt_controllers) {
|
||||
VERIFY(irq_controller);
|
||||
if (irq_controller->type() == IRQControllerType::i82093AA) {
|
||||
irq_controller->hard_disable();
|
||||
dbgln("Interrupts: Detected {} - Disabled", irq_controller->model());
|
||||
} else {
|
||||
dbgln("Interrupts: Detected {}", irq_controller->model());
|
||||
}
|
||||
}
|
||||
dbgln("Interrupts: Detected {}", m_interrupt_controllers[0]->model());
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT void InterruptManagement::switch_to_ioapic_mode()
|
||||
|
|
Loading…
Reference in a new issue