mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +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
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…
Add table
Add a link
Reference in a new issue