Adds the ARM build target to EmulatorPkg.
Moves PcdDxeIplSwitchToLongMode and PcdDxeIplBuildPageTables to
only apply for the IA32 and X64 build targets since they are
not used on ARM.
Adds ARM compiler instrinsics libraries.
Adds NULL implementation of ArmMmuLib.
Disables EbcDxe on ARM builds since EbcDxe does not support the
ARM architecture.
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
EmulatorPkg/EmulatorPkg.dsc | 17 ++++++++++++++---
EmulatorPkg/EmulatorPkg.fdf | 6 ++++--
EmulatorPkg/build.sh | 13 ++++++++++++-
3 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index b44435d7e6..19ba60aa23 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -4,7 +4,7 @@
# The Emulation Platform can be used to debug individual modules, prior to creating
# a real platform. This also provides an example for how an DSC is created.
#
-# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2023, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.<BR>
# Copyright (c) Microsoft Corporation.
#
@@ -19,7 +19,7 @@
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/Emulator$(ARCH)
- SUPPORTED_ARCHITECTURES = X64|IA32
+ SUPPORTED_ARCHITECTURES = X64|IA32|ARM
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = EmulatorPkg/EmulatorPkg.fdf
@@ -140,6 +140,13 @@
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
!endif
+[LibraryClasses.ARM]
+ ArmMmuLib|ArmPkg/Library/ArmMmuNullLib/ArmMmuNullLib.inf
+ NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+ # Add support for GCC stack protector
+ NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+
[LibraryClasses.common.SEC]
PeiServicesLib|EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
@@ -211,8 +218,10 @@
TimerLib|EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.inf
[PcdsFeatureFlag]
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|FALSE
+
+[PcdsFeatureFlag.IA32, PcdsFeatureFlag.X64]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables|FALSE
[PcdsFixedAtBuild]
@@ -368,7 +377,9 @@
!endif
}
+!if "ARM" not in $(ARCH)
MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
+!endif
MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
EmulatorPkg/EmuThunkDxe/EmuThunk.inf
EmulatorPkg/CpuRuntimeDxe/Cpu.inf
diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf
index 5420756eaa..06f002a624 100644
--- a/EmulatorPkg/EmulatorPkg.fdf
+++ b/EmulatorPkg/EmulatorPkg.fdf
@@ -1,7 +1,7 @@
## @file
# This is Emulator FDF file with UEFI HII features enabled
#
-# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2023, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2009 - 2011, Apple Inc. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -148,7 +148,9 @@ INF EmulatorPkg/ResetRuntimeDxe/Reset.inf
INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
INF EmulatorPkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
+!if "ARM" not in $(ARCH)
+ INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
+!endif
INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
INF EmulatorPkg/EmuThunkDxe/EmuThunk.inf
INF EmulatorPkg/CpuRuntimeDxe/Cpu.inf
diff --git a/EmulatorPkg/build.sh b/EmulatorPkg/build.sh
index 76c22dfaf8..55f9cbaa1b 100755
--- a/EmulatorPkg/build.sh
+++ b/EmulatorPkg/build.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2010 - 2023, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -83,6 +83,15 @@ case `uname` in
x86_64)
HOST_PROCESSOR=X64
;;
+ armv6l)
+ HOST_PROCESSOR=ARM
+ ;;
+ armv7l)
+ HOST_PROCESSOR=ARM
+ ;;
+ armv8l)
+ HOST_PROCESSOR=ARM
+ ;;
esac
gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
@@ -174,6 +183,8 @@ case $PROCESSOR in
LIB_NAMES="ld-linux-x86-64.so.2 libdl.so.2 crt1.o crti.o crtn.o"
LIB_SEARCH_PATHS="/usr/lib/x86_64-linux-gnu /usr/lib64 /lib64 /usr/lib /lib"
;;
+ ARM)
+ ARCH_SIZE=32
esac
for libname in $LIB_NAMES
--
2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100704): https://edk2.groups.io/g/devel/message/100704
Mute This Topic: https://groups.io/mt/97414908/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.