]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[cloud] Use PCIAPI_DIRECT for cloud images
authorMichael Brown <mcb30@ipxe.org>
Sat, 13 Feb 2021 19:41:03 +0000 (19:41 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sat, 13 Feb 2021 19:41:03 +0000 (19:41 +0000)
The version of SeaBIOS found on some AWS EC2 instances (observed with
t3a.nano in eu-west-1) has no support for the INT 1A PCI BIOS calls.

Bring config/ioapi.h into the named-configuration set of headers, and
specify the use of PCIAPI_DIRECT for CONFIG=cloud, to work around the
missing PCI BIOS support.

Switching to a different named configuration will now unfortunately
cause an almost complete rebuild of iPXE.  As described in commit
c801cb2 ("[build] Allow for named configurations at build time"), this
is the reason why config/ioapi.h was not originally in the
named-configuration set of header files.

This rebuild cost is acceptable given that build times are
substantially faster now than seven years ago, and that very few
people are likely to be switching named configurations on a regular
basis.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/config/cloud/ioapi.h [new file with mode: 0644]
src/config/ioapi.h
src/config/qemu/ioapi.h [new file with mode: 0644]
src/config/rpi/ioapi.h [new file with mode: 0644]
src/config/vbox/ioapi.h [new file with mode: 0644]

diff --git a/src/config/cloud/ioapi.h b/src/config/cloud/ioapi.h
new file mode 100644 (file)
index 0000000..c7c917f
--- /dev/null
@@ -0,0 +1,7 @@
+/* Work around missing PCI BIOS calls in the cut-down SeaBIOS found in
+ * some AWS EC2 instances.
+ */
+#ifdef PLATFORM_pcbios
+#undef PCIAPI_PCBIOS
+#define PCIAPI_DIRECT
+#endif
index abe5a50ceb504ac47a9c4b5f651195448948f0b8..a1498482d9a30a15461dd329c6e3974568c63157 100644 (file)
@@ -14,6 +14,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
 //#undef       PCIAPI_PCBIOS           /* Access via PCI BIOS */
 //#define      PCIAPI_DIRECT           /* Direct access via Type 1 accesses */
 
+#include <config/named.h>
+#include NAMED_CONFIG(ioapi.h)
 #include <config/local/ioapi.h>
+#include LOCAL_NAMED_CONFIG(ioapi.h)
 
 #endif /* CONFIG_IOAPI_H */
diff --git a/src/config/qemu/ioapi.h b/src/config/qemu/ioapi.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/config/rpi/ioapi.h b/src/config/rpi/ioapi.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/config/vbox/ioapi.h b/src/config/vbox/ioapi.h
new file mode 100644 (file)
index 0000000..e69de29