diff options
author | Andrei Warkentin <andrei.warkentin@intel.com> | 2023-02-17 18:33:55 -0600 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-03-08 18:10:34 +0000 |
commit | dc5880d02f6507419c0381bb4e90fdafb4aaf751 (patch) | |
tree | d82cea0b8ca22177c835898b2a5e7c139978b2fa | |
parent | 7fa469263638d150185a17ff3f07f9bcf63f0378 (diff) | |
download | edk2-dc5880d02f6507419c0381bb4e90fdafb4aaf751.zip edk2-dc5880d02f6507419c0381bb4e90fdafb4aaf751.tar.gz edk2-dc5880d02f6507419c0381bb4e90fdafb4aaf751.tar.bz2 |
MdePkg: BasePeCoffLib: Allow AArch64 and x64 images in ImageFormatSupported
ARM64 and X64 may allow such foreign images to be used when
driver implementing EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL is
present.
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Daniel Schaefer <git@danielschaefer.me>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Andrei Warkentin <andrei.warkentin@intel.com>
-rw-r--r-- | MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c index adbfe9c..67c4af1 100644 --- a/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c +++ b/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c @@ -104,7 +104,15 @@ PeCoffLoaderImageFormatSupported ( IN UINT16 Machine
)
{
- if (Machine == IMAGE_FILE_MACHINE_RISCV64) {
+ /*
+ * ARM64 and X64 may allow such foreign images to be used when
+ * a driver implementing EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL is
+ * present.
+ */
+ if ((Machine == IMAGE_FILE_MACHINE_RISCV64) ||
+ (Machine == IMAGE_FILE_MACHINE_ARM64) ||
+ (Machine == IMAGE_FILE_MACHINE_X64))
+ {
return TRUE;
}
|