Skip to content

Support the I/O APIC alongside the 8259 PIC

Jacob Lorentzon requested to merge 4lDO2/kernel:ioapic into master

Modifies some of the IRQ logic so that when ACPI is enabled, all IRQs will be routed using the I/O APIC. This requires some extra ACPI, and thus two additional kernel arguments have been added. The UEFI bootloader (and probably coreboot) will set these to a length-data linked list stored in a flat buffer, or (for BIOS) it will just equal NULL.

I haven't begun parsing the _PRT (PCI routing table) to get INTx# irqs working again (MSI-X on xhcid works fine, as MSI doesn't use the I/O APIC), and because the UEFI RSDP passing isn't quite correct yet. This is required since the mapping from PCI INTx# pins to the actual interrupt lines on the I/O APIC are only found in the ACPI or MP tables. Therefore, the I/O APIC is disabled by default (can be enabled by uncommenting the ioapic init call), and the 8259 PIC (which maps PCI interrupts automagically) is used instead.

Still WIP because I'm unsure about whether the current way to pass RSDPs is optimal enough.

Depends on bootloader-efi!3 (merged).

Edited by Jacob Lorentzon

Merge request reports