[pci] Use linker tables for runtime selectable PCI APIs

Use the linker table mechanism to enumerate the underlying PCI I/O
APIs, to allow PCIAPI_CLOUD to become architecture-independent code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-11-24 20:18:52 +00:00
parent 0cf2f8028c
commit ff1a17dc7e
12 changed files with 59 additions and 43 deletions

View File

@@ -4,4 +4,7 @@
#ifdef PLATFORM_pcbios
#undef PCIAPI_PCBIOS
#define PCIAPI_CLOUD
#define PCIAPI_RUNTIME_ECAM
#define PCIAPI_RUNTIME_PCBIOS
#define PCIAPI_RUNTIME_DIRECT
#endif

View File

@@ -22,6 +22,7 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <config/settings.h>
#include <config/ioapi.h>
/** @file
*
@@ -34,3 +35,13 @@ PROVIDE_REQUIRING_SYMBOL();
#ifdef PCI_SETTINGS
REQUIRE_OBJECT ( pci_settings );
#endif
#ifdef PCIAPI_RUNTIME_ECAM
REQUIRE_OBJECT ( ecam );
#endif
#ifdef PCIAPI_RUNTIME_PCBIOS
REQUIRE_OBJECT ( pcibios );
#endif
#ifdef PCIAPI_RUNTIME_DIRECT
REQUIRE_OBJECT ( pcidirect );
#endif