mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
[pci] Separate permission to probe buses from bus:dev.fn range discovery
The UEFI device model requires us to not probe the PCI bus directly, but instead to wait to be offered the opportunity to drive devices via our driver service binding handle. We currently inhibit PCI bus probing by having pci_discover() return an empty range when using the EFI PCI I/O API. This has the unwanted side effect that scanning the bus manually using the "pciscan" command will also fail to discover any devices. Separate out the concept of being allowed to probe PCI buses from the mechanism for discovering PCI bus:dev.fn address ranges, so that this limitation may be removed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -362,6 +362,7 @@ void * efipci_ioremap ( struct pci_device *pci, unsigned long bus_addr,
|
||||
return ioremap ( bus_addr, len );
|
||||
}
|
||||
|
||||
PROVIDE_PCIAPI_INLINE ( efi, pci_can_probe );
|
||||
PROVIDE_PCIAPI_INLINE ( efi, pci_discover );
|
||||
PROVIDE_PCIAPI_INLINE ( efi, pci_read_config_byte );
|
||||
PROVIDE_PCIAPI_INLINE ( efi, pci_read_config_word );
|
||||
|
||||
@@ -188,6 +188,7 @@ int linux_pci_write ( struct pci_device *pci, unsigned long where,
|
||||
return rc;
|
||||
}
|
||||
|
||||
PROVIDE_PCIAPI_INLINE ( linux, pci_can_probe );
|
||||
PROVIDE_PCIAPI_INLINE ( linux, pci_discover );
|
||||
PROVIDE_PCIAPI_INLINE ( linux, pci_read_config_byte );
|
||||
PROVIDE_PCIAPI_INLINE ( linux, pci_read_config_word );
|
||||
|
||||
Reference in New Issue
Block a user