* [edk2 1/1] RISCV: Allow AArch64 and x64 images in BasePeCoffLib
@ 2023-02-18 4:03 Andrei Warkentin
0 siblings, 0 replies; only message in thread
From: Andrei Warkentin @ 2023-02-18 4:03 UTC (permalink / raw)
To: devel
Cc: Andrei Warkentin, Sunil V L, Daniel Schaefer, Michael D Kinney,
Liming Gao, Zhiguang Liu
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>
---
MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c
index adbfe9ccf580..0e9ee395dc26 100644
--- a/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c
@@ -104,7 +104,14 @@ 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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-18 4:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-18 4:03 [edk2 1/1] RISCV: Allow AArch64 and x64 images in BasePeCoffLib Andrei Warkentin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox