diff options
author | Michael Brown <mcb30@ipxe.org> | 2021-04-10 13:14:30 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-04-10 15:05:05 +0100 |
commit | 0be8491b717fec6697dbf6ef8ac07604e062ecb1 (patch) | |
tree | 1f5d84a13dbd6113e7e884a2795e6e01cdda3a31 /src/include/ipxe/pci.h | |
parent | c0346dbb49de0bb6c7637c511a175ce478aca9b9 (diff) | |
download | ipxe-0be8491b717fec6697dbf6ef8ac07604e062ecb1.tar.gz |
[pci] Avoid scanning nonexistent buses when using PCIAPI_DIRECT
There is no method for obtaining the number of PCI buses when using
PCIAPI_DIRECT, and we therefore currently scan all possible bus
numbers. This can cause a several-second startup delay in some
virtualised environments, since PCI configuration space access will
necessarily require the involvement of the hypervisor.
Ameliorate this situation by defaulting to scanning only a single bus,
and expanding the number of PCI buses to accommodate any subordinate
buses that are detected during enumeration.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/pci.h')
-rw-r--r-- | src/include/ipxe/pci.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/ipxe/pci.h b/src/include/ipxe/pci.h index 6632c574d..933f48530 100644 --- a/src/include/ipxe/pci.h +++ b/src/include/ipxe/pci.h @@ -135,6 +135,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define PCI_CLASS_SERIAL_USB_EHCI 0x20 /**< ECHI USB controller */ #define PCI_CLASS_SERIAL_USB_XHCI 0x30 /**< xHCI USB controller */ +/** Subordinate bus number */ +#define PCI_SUBORDINATE 0x1a + /** Construct PCI class * * @v base Base class (or PCI_ANY_ID) |