#define PCIAPI_RUNTIME_PCBIOS
#define PCIAPI_RUNTIME_DIRECT
#endif
+
+/* Work around missing PCI host bridge drivers in the cut-down UEFI found
+ * in some AWS EC2 instances.
+ */
+#ifdef PLATFORM_efi
+#undef PCIAPI_EFI
+#define PCIAPI_CLOUD
+#define PCIAPI_RUNTIME_EFI
+#define PCIAPI_RUNTIME_ECAM
+#endif
#ifdef PCIAPI_RUNTIME_DIRECT
REQUIRE_OBJECT ( pcidirect );
#endif
+#ifdef PCIAPI_RUNTIME_EFI
+REQUIRE_OBJECT ( efi_pci );
+#endif
#endif
/* PCI runtime selectable API priorities */
-#define PCIAPI_PRIORITY_ECAM 01 /**< ACPI ECAM */
-#define PCIAPI_PRIORITY_PCBIOS 02 /**< PCI BIOS calls */
-#define PCIAPI_PRIORITY_DIRECT 03 /**< Direct Type 1 accesses */
+#define PCIAPI_PRIORITY_EFI 01 /**< EFI PCI I/O protocols */
+#define PCIAPI_PRIORITY_ECAM 02 /**< ACPI ECAM */
+#define PCIAPI_PRIORITY_PCBIOS 03 /**< PCI BIOS calls */
+#define PCIAPI_PRIORITY_DIRECT 04 /**< Direct Type 1 accesses */
/** Provide a runtime selectable PCI I/O API */
#define PROVIDE_PCIAPI_RUNTIME( subsys, priority ) \
PROVIDE_PCIAPI_INLINE ( efi, pci_write_config_word );
PROVIDE_PCIAPI_INLINE ( efi, pci_write_config_dword );
PROVIDE_PCIAPI ( efi, pci_ioremap, efipci_ioremap );
+PROVIDE_PCIAPI_RUNTIME ( efi, PCIAPI_PRIORITY_EFI );
/******************************************************************************
*