1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

Kernel/AHCI: Add a boot argument to force AHCI to operate on IRQ 11

As a compromise, if the fimrware decided to set the IRQ line to be 7,
or something else we can't deal with, the user can simply force the code
to work with IRQ 11, with the boot argument "force_ahci_irq_11" being
set to "on".
This commit is contained in:
Liav A 2021-03-19 04:51:40 +02:00 committed by Andreas Kling
parent 36a82188a8
commit cfc2f33dcb
3 changed files with 13 additions and 0 deletions

View file

@ -172,6 +172,13 @@ void AHCIController::initialize()
hba().control_regs.ghc = 0x80000000; // Ensure that HBA knows we are AHCI aware.
PCI::enable_interrupt_line(pci_address());
PCI::enable_bus_mastering(pci_address());
// FIXME: This is a hack for VMWare (and possibly other hardware) that set
// the IRQ line to 7 or other weird value. Find a better way to set this
// with balancing IRQ sharing in mind.
if (kernel_command_line().is_forcing_irq_11_for_ahci())
PCI::set_interrupt_line(pci_address(), 11);
enable_global_interrupts();
m_handlers.append(AHCIPortHandler::create(*this, PCI::get_interrupt_line(pci_address()),
AHCI::MaskedBitField((volatile u32&)(hba().control_regs.pi))));