mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 22:08:48 +03:00
[pci] Support systems with multiple PCI root bridges
Extend the 16-bit PCI bus:dev.fn address to a 32-bit seg:bus:dev.fn address, assuming a segment value of zero in contexts where multiple segments are unsupported by the underlying data structures (e.g. in the iBFT or BOFM tables). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -36,10 +36,12 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
* Prepare for Type 1 PCI configuration space access
|
||||
*
|
||||
* @v pci PCI device
|
||||
* @v where Location within PCI configuration space
|
||||
* @v where Location within PCI configuration space
|
||||
*/
|
||||
void pcidirect_prepare ( struct pci_device *pci, int where ) {
|
||||
outl ( ( 0x80000000 | ( pci->busdevfn << 8 ) | ( where & ~3 ) ),
|
||||
uint16_t busdevfn = ( pci->busdevfn & 0xffff );
|
||||
|
||||
outl ( ( 0x80000000 | ( busdevfn << 8 ) | ( where & ~3 ) ),
|
||||
PCIDIRECT_CONFIG_ADDRESS );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user