[ipxe-devel] EFI PCI configuration access not working on system with more PCI segments
Petr Borsodi
petr.borsodi at gmail.com
Mon Dec 7 16:42:14 UTC 2020
I tried iPXE for my own custom PCI Express card on a Dell PowerEdge R7515 server.
I found an interesting problem - the iPXE driver will only find the card in the first PCIe slot.
I examined this issue in more detail and discovered the following:
1.
The server uses 4 PCI Roots and these roots share same PCI segment (0)
2.
First slot belongs PCI Root with index 0
3.
Other slots had a different PCI Root
4.
The device binding fails in the |efipci_read| function (see the efi_pci.c file) because|root-> Pci.Read| returns an INVALID PARAMETER error.
5.
The |efipci_root_open| function pairs the PCI Root with the PCI segment number and thus always finds the first PCI Root
I think this pairing method is bad. The UEFI specification in chapter *PCI Root Bridge I/O Overview* says:
A PCI Host Bridge and PCI Root Bridge are different than a PCI Segment. A PCI Segment is a
collection of up to 256 PCI busses that share the same PCI Configuration Space. Depending on
the chipset, a single EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL may abstract a portion of a PCI
Segment, or an entire PCI Segment. A PCI Host Bridge may produce one or more PCI Root
Bridges. When a PCI Host Bridge produces multiple PCI Root Bridges, it is possible to have
more than one PCI Segment.
I have no idea how reliably fix this issue.
See also https://github.com/ipxe/ipxe/issues/173
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20201207/a34d4e0f/attachment.htm>
More information about the ipxe-devel
mailing list