summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/OvmfPkgIa32.dsc
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2020-02-26 20:43:43 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-03-04 09:26:45 +0000
commitd55cfdc51f93b6622c3780d4cc2ba2769c154a15 (patch)
treec953daedf7f7a0923521b14747b3fc94afb7a820 /OvmfPkg/OvmfPkgIa32.dsc
parentd8dd54f071cfd60a2dcf5426764a89cd91213420 (diff)
downloadedk2-d55cfdc51f93b6622c3780d4cc2ba2769c154a15.tar.gz
edk2-d55cfdc51f93b6622c3780d4cc2ba2769c154a15.tar.bz2
edk2-d55cfdc51f93b6622c3780d4cc2ba2769c154a15.zip
OvmfPkg IA32: add support for loading X64 images
This is the UEFI counterpart to my Linux series which generalizes mixed mode support into a feature that requires very little internal knowledge about the architecture specifics of booting Linux on the part of the bootloader or firmware. Instead, we add a .compat PE/COFF header containing an array of PE_COMPAT nodes containing <machine type, entrypoint> tuples that describe alternate entrypoints into the image for different native machine types, e.g., IA-32 in a 64-bit image so it can be booted from IA-32 firmware. This patch implements the PE/COFF emulator protocol to take this new section into account, so that such images can simply be loaded via LoadImage/StartImage, e.g., straight from the shell. This feature is based on the EDK2 specific PE/COFF emulator protocol that was introduced in commit 57df17fe26cd ("MdeModulePkg/DxeCore: invoke the emulator protocol for foreign images", 2019-04-14). Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2564 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/OvmfPkgIa32.dsc')
-rw-r--r--OvmfPkg/OvmfPkgIa32.dsc5
1 files changed, 5 insertions, 0 deletions
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 76e52a3de1..8d91903f8b 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -33,6 +33,7 @@
DEFINE SOURCE_DEBUG_ENABLE = FALSE
DEFINE TPM2_ENABLE = FALSE
DEFINE TPM2_CONFIG_ENABLE = FALSE
+ DEFINE LOAD_X64_ON_IA32_ENABLE = FALSE
#
# Network definition
@@ -932,3 +933,7 @@
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
!endif
!endif
+
+!if $(LOAD_X64_ON_IA32_ENABLE) == TRUE
+ OvmfPkg/CompatImageLoaderDxe/CompatImageLoaderDxe.inf
+!endif