PCI check for MSIs and enable if possible
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 3m55s
Build documentation / build-and-deploy (push) Successful in 3m5s

This commit is contained in:
2026-03-22 11:22:03 +01:00
parent d2ccb96b27
commit 5492b564dd
3 changed files with 96 additions and 22 deletions

View File

@@ -123,8 +123,13 @@ bool pci_ide_init (struct proc* proc, struct reschedule_ctx* rctx, struct pci_in
irqs_support = false;
} else {
irqs_support = true;
ioapic_route_irq (IDE_DRIVE_PRIM, 14, 0, thiscpu->lapic_id);
ioapic_route_irq (IDE_DRIVE_SCND, 15, 0, thiscpu->lapic_id);
if (!pci_msi_init (pci_info.bus, pci_info.slot, pci_info.func, IDE_DRIVE_PRIM,
thiscpu->lapic_id)) {
ioapic_route_irq (IDE_DRIVE_PRIM, 14, 0, thiscpu->lapic_id);
ioapic_route_irq (IDE_DRIVE_SCND, 15, 0, thiscpu->lapic_id);
DEBUG ("Fallback to IOAPIC interrupt routing\n");
}
}
DEBUG ("pcmd=%x, pctrl=%x\n", pcmd, pctrl);