[pci] Allow probing permission to vary by range

Make pci_can_probe() part of the runtime selectable PCI I/O API, and
defer this check to the per-range API.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-11-24 23:09:53 +00:00
parent ff1a17dc7e
commit 9c1ac48bcf
10 changed files with 33 additions and 22 deletions

View File

@@ -35,10 +35,11 @@ extern int pcibios_write ( struct pci_device *pci, uint32_t command,
/**
* Check if PCI bus probing is allowed
*
* @v pci PCI device
* @ret ok Bus probing is allowed
*/
static inline __always_inline int
PCIAPI_INLINE ( pcbios, pci_can_probe ) ( void ) {
PCIAPI_INLINE ( pcbios, pci_can_probe ) ( struct pci_device *pci __unused ) {
return 1;
}

View File

@@ -28,10 +28,11 @@ extern void pcidirect_prepare ( struct pci_device *pci, int where );
/**
* Check if PCI bus probing is allowed
*
* @v pci PCI device
* @ret ok Bus probing is allowed
*/
static inline __always_inline int
PCIAPI_INLINE ( direct, pci_can_probe ) ( void ) {
PCIAPI_INLINE ( direct, pci_can_probe ) ( struct pci_device *pci __unused ) {
return 1;
}