]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[pci] Map all MSI-X interrupts to a dummy target address by default
authorMichael Brown <mcb30@ipxe.org>
Thu, 9 Oct 2025 15:01:51 +0000 (16:01 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 9 Oct 2025 15:29:29 +0000 (16:29 +0100)
commit4224f574daa2cea6e8f402e766cdbb35a0178487
tree7f05f2accff85ca9377f95a5b9fc4d2bc75adbf0
parentce30ba14fcf1a50e5e8cd7461b098023d08cab42
[pci] Map all MSI-X interrupts to a dummy target address by default

Interrupts as such are not used in iPXE, which operates in polling
mode.  However, some network cards (such as the Intel 40GbE and 100GbE
NICs) will defer writing out completions until the point of asserting
an MSI-X interrupt.

From the point of view of the PCI device, asserting an MSI-X interrupt
is just a 32-bit DMA write of an opaque value to an opaque target
address.  The PCI device has no know to know whether or not the target
address corresponds to a real APIC.

We can therefore trick the PCI device into believing that it is
asserting an MSI-X interrupt, by configuring it to write an opaque
32-bit value to a dummy target address in host memory.  This is
sufficient to trigger the associated write of the completions to host
memory.

Allocate a dummy target address when enabling MSI-X on a PCI device,
and map all interrupts to this target address by default.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/bus/pcimsix.c
src/include/ipxe/pcimsix.h