mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
Kernel: Add MSI support to AHCI
Add MSI support to AHCI. Prefer MSI interrupts over pin-based interrupts.
This commit is contained in:
parent
8f62e62cfe
commit
6c7ee5344c
3 changed files with 6 additions and 5 deletions
|
@ -167,12 +167,13 @@ UNMAP_AFTER_INIT ErrorOr<void> AHCIController::initialize_hba(PCI::DeviceIdentif
|
|||
u32 version = hba().control_regs.version;
|
||||
|
||||
hba().control_regs.ghc = 0x80000000; // Ensure that HBA knows we are AHCI aware.
|
||||
PCI::enable_interrupt_line(device_identifier());
|
||||
PCI::enable_bus_mastering(device_identifier());
|
||||
TRY(reserve_irqs(1, true));
|
||||
auto irq = MUST(allocate_irq(0));
|
||||
enable_global_interrupts();
|
||||
|
||||
auto implemented_ports = AHCI::MaskedBitField((u32 volatile&)(hba().control_regs.pi));
|
||||
m_irq_handler = AHCIInterruptHandler::create(*this, pci_device_identifier.interrupt_line().value(), implemented_ports).release_value_but_fixme_should_propagate_errors();
|
||||
m_irq_handler = AHCIInterruptHandler::create(*this, irq, implemented_ports).release_value_but_fixme_should_propagate_errors();
|
||||
TRY(reset());
|
||||
|
||||
dbgln_if(AHCI_DEBUG, "{}: AHCI Controller Version = {:#08x}", device_identifier().address(), version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue