[ipxe-devel] EFI PCI configuration access not working on system with more PCI segments

Thomas Walker Thomas.Walker at twosigma.com
Tue Dec 8 19:14:09 UTC 2020


I submitted a patch for exactly this back in May (https://lists.ipxe.org/pipermail/ipxe-devel/2020-May/007058.html)
but failed to follow-up on it.  We've been using this patch in production for ~6 months with no issues though.

On Mon, Dec 07, 2020 at 05:42:14PM +0100, Petr Borsodi wrote:
> 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
> 
> 

> _______________________________________________
> ipxe-devel mailing list
> ipxe-devel at lists.ipxe.org
> https://secure-web.cisco.com/1coHpQo5lcwzWd0dgtHrE0liW0m9UzT1C_HNRdFK0SiZb5CnLeVipYtGLPFEy_pzzWkpC6Tk4SRi2qoMizpC7ou8OEvLkrWoK_3Z9yF9VoFgDqCRvWEwiJ-sdY8vUOdvK9-_j5SnWbXWkyKW00wGNRhPUkx7_emqiE2ag-2jV24e4vqUzQmRvG89JaWd_zFu1-eAPEIwqQdIKuJBt2yoryb58kG15rCsBupUkncfnWZG7k_s2TQxBtnlfj1f4BDuBy_C1jK_MKCNGIDeFZMM0hg/https%3A%2F%2Flists.ipxe.org%2Fmailman%2Flistinfo%2Fipxe-devel




More information about the ipxe-devel mailing list