[pci] Add support for PCI MSI-X interrupts
authorMichael Brown <mcb30@ipxe.org>
Mon, 22 Apr 2019 13:43:23 +0000 (14:43 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 24 Apr 2019 10:41:38 +0000 (11:41 +0100)
commitafee77d816f42c7e405c065395c6a7f4dc2aade1
treed7a248ae2c5039622e5bbbee98fb31d0b65e7fc0
parentebf2eaf515e46abd43bc798e7e4ba77bfe529218
[pci] Add support for PCI MSI-X interrupts

The Intel 40 Gigabit Ethernet virtual functions support only MSI-X
interrupts, and will write back completed interrupt descriptors only
when the device attempts to raise an interrupt (or when a complete
cacheline of receive descriptors has been completed).

We cannot actually use MSI-X interrupts within iPXE, since we never
have ownership of the APIC.  However, an MSI-X interrupt is
fundamentally just a DMA write of a single dword to an arbitrary
address.  We can therefore configure the device to "raise" an
interrupt by writing a meaningless value to an otherwise unused memory
location: this is sufficient to trigger the receive descriptor
writeback logic.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/bus/pcimsix.c [new file with mode: 0644]
src/include/ipxe/errfile.h
src/include/ipxe/pci.h
src/include/ipxe/pcimsix.h [new file with mode: 0644]