ArmVirtPkg: Drop ARM Virtual Platforms

Per the additional suggestion in RFC
https://edk2.groups.io/g/devel/topic/rfc_remove_ovmf_ia32_and/114152215,
this drops ARM 32 bit virtual platforms. The full rationale
is included in the RFC.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
This commit is contained in:
Oliver Smith-Denny 2025-08-25 15:25:12 -07:00 committed by mergify[bot]
parent 1fb88ffe28
commit b471ed2969
27 changed files with 20 additions and 421 deletions

View file

@ -18,7 +18,7 @@
DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x8000004F
# Dynamic stack cookies pushes the FD size up slightly over 2MB
!if $(TARGET) != NOOPT && $(ARCH) == ARM
!if $(TARGET) != NOOPT
DEFINE FD_SIZE_IN_MB = 2
!else
DEFINE FD_SIZE_IN_MB = 3
@ -37,7 +37,6 @@
GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
GCC:*_*_ARM_DLINK_FLAGS = -z common-page-size=0x1000
GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
[LibraryClasses.common]
@ -95,9 +94,6 @@
# Networking Requirements
!include NetworkPkg/NetworkLibs.dsc.inc
!if ($(NETWORK_TLS_ENABLE) == TRUE) AND ($(ARCH) == ARM)
!error "NETWORK_TLS_ENABLE is not supported on ARM build!"
!endif
# ARM Architectural Libraries
CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf
@ -179,6 +175,9 @@
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
[LibraryClasses.common.SEC]
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
@ -262,24 +261,8 @@
!endif
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
[LibraryClasses.AARCH64.DXE_RUNTIME_DRIVER]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
[LibraryClasses.ARM.DXE_RUNTIME_DRIVER]
BaseCryptLib|CryptoPkg/Library/BaseCryptLibMbedTls/RuntimeCryptLib.inf
[LibraryClasses.AARCH64]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
[LibraryClasses.ARM]
BaseCryptLib|CryptoPkg/Library/BaseCryptLibMbedTls/BaseCryptLib.inf
MbedTlsLib|CryptoPkg/Library/MbedTlsLib/MbedTlsLib.inf
RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
[BuildOptions]
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
@ -299,7 +282,6 @@
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE
[PcdsFeatureFlag.AARCH64]
#
# Activate AcpiSdtProtocol
#
@ -407,7 +389,6 @@
!include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
[Components.AARCH64]
#
# ACPI Support
#

View file

@ -15,8 +15,8 @@
PLATFORM_GUID = DFFED32B-DFFE-D32B-DFFE-D32BDFFED32B
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/ArmVirtCloudHv-$(ARCH)
SUPPORTED_ARCHITECTURES = AARCH64|ARM
OUTPUT_DIRECTORY = Build/ArmVirtCloudHv-AARCH64
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = ArmVirtPkg/ArmVirtCloudHv.fdf
@ -157,7 +157,6 @@
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3
gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000
[PcdsFixedAtBuild.AARCH64]
# Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point,
# if the entry point version is >= 3.0. AARCH64 OSes cannot assume the
# presence of the 32-bit entry point anyway (because many AARCH64 systems
@ -363,7 +362,6 @@
# ACPI Support
#
ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf
[Components.AARCH64]
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf {
<LibraryClasses>

View file

@ -58,11 +58,7 @@ NumBlocks = $(FD_NUM_BLOCKS)
#
0x00000000|0x00001000
DATA = {
!if $(ARCH) == AARCH64
0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
!else
0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
!endif
}
0x00001000|$(FVMAIN_COMPACT_SIZE)
@ -188,11 +184,9 @@ READ_LOCK_STATUS = TRUE
# ACPI Support
#
INF ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf
!if $(ARCH) == AARCH64
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
INF ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf
!endif
#
# PCI support

View file

@ -20,22 +20,19 @@
!ifdef $(EDK2_OUT_DIR)
OUTPUT_DIRECTORY = $(EDK2_OUT_DIR)
!else
OUTPUT_DIRECTORY = Build/ArmVirtKvmTool-$(ARCH)
OUTPUT_DIRECTORY = Build/ArmVirtKvmTool-AARCH64
!endif
SUPPORTED_ARCHITECTURES = AARCH64|ARM
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = ArmVirtPkg/ArmVirtKvmTool.fdf
[Defines.AARCH64]
DEFINE ACPIVIEW_ENABLE = TRUE
# This comes at the beginning of includes to pick all relevant defines early on.
!include ArmVirtPkg/ArmVirtStackCookies.dsc.inc
!if $(ARCH) == AARCH64
!include DynamicTablesPkg/DynamicTables.dsc.inc
!endif
!include MdePkg/MdeLibs.dsc.inc
@ -392,9 +389,7 @@
#
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
!if $(ARCH) == AARCH64
#
# ACPI Support
#
ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
!endif

View file

@ -52,7 +52,6 @@ NumBlocks = 0x200
#
0x00000000|0x00008000
DATA = {
!if $(ARCH) == AARCH64
0x01, 0x00, 0x00, 0x10, # code0: adr x1, .
0xff, 0x1f, 0x00, 0x14, # code1: b 0x8000
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB
@ -63,22 +62,6 @@ DATA = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4
0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"
0x00, 0x00, 0x00, 0x00 # res5
!else
0x08, 0x10, 0x4f, 0xe2, # adr r1, .
0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0xf6, 0x1f, 0x00, 0xea, # b 0x8000
0x18, 0x28, 0x6f, 0x01, # magic
0x00, 0x00, 0x00, 0x00, # start
0x00, 0x00, 0x20, 0x00, # image size: 2 MB
0x01, 0x02, 0x03, 0x04 # endiannness flag
!endif
}
0x00008000|0x001f8000
@ -200,7 +183,6 @@ READ_LOCK_STATUS = TRUE
INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
INF OvmfPkg/Virtio10Dxe/Virtio10.inf
!if $(ARCH) == AARCH64
#
# ACPI Support
#
@ -211,7 +193,6 @@ READ_LOCK_STATUS = TRUE
!include DynamicTablesPkg/DynamicTables.fdf.inc
INF ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
!endif
#
# TianoCore logo (splash screen)

View file

@ -17,8 +17,8 @@
PLATFORM_GUID = 37d7e986-f7e9-45c2-8067-e371421a626c
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/ArmVirtQemu-$(ARCH)
SUPPORTED_ARCHITECTURES = AARCH64|ARM
OUTPUT_DIRECTORY = Build/ArmVirtQemu-AArch64
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = ArmVirtPkg/ArmVirtQemu.fdf
@ -109,12 +109,8 @@
MemDebugLogLib|OvmfPkg/Library/MemDebugLogLib/MemDebugLogLibNull.inf
!endif
[LibraryClasses.AARCH64]
ArmPlatformLib|ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformLibQemu.inf
[LibraryClasses.ARM]
ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
[LibraryClasses.common.PEIM]
ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
ArmMonitorLib|ArmVirtPkg/Library/ArmVirtMonitorPeiLib/ArmVirtMonitorPeiLib.inf
@ -127,13 +123,9 @@
MemDebugLogLib|OvmfPkg/Library/MemDebugLogLib/MemDebugLogLibNull.inf
!endif
[LibraryClasses.AARCH64.PEIM]
ArmMmuLib|UefiCpuPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
[LibraryClasses.ARM.PEIM]
BaseCryptLib|CryptoPkg/Library/BaseCryptLibMbedTls/PeiCryptLib.inf
[LibraryClasses.common.DXE_DRIVER]
AcpiPlatformLib|OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf

View file

@ -60,11 +60,7 @@ NumBlocks = $(FD_NUM_BLOCKS)
#
0x00000000|0x00001000
DATA = {
!if $(ARCH) == AARCH64
0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
!else
0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
!endif
}
0x00001000|$(FVMAIN_COMPACT_SIZE)

View file

@ -147,11 +147,9 @@ READ_LOCK_STATUS = TRUE
# ACPI Support
#
INF OvmfPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf
!if $(ARCH) == AARCH64
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
!endif
#
# PCI support

View file

@ -17,8 +17,8 @@
PLATFORM_GUID = 37d7e986-f7e9-45c2-8067-e371421a626c
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/ArmVirtQemuKernel-$(ARCH)
SUPPORTED_ARCHITECTURES = AARCH64|ARM
OUTPUT_DIRECTORY = Build/ArmVirtQemuKernel-AArch64
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = ArmVirtPkg/ArmVirtQemuKernel.fdf

View file

@ -60,7 +60,6 @@ NumBlocks = $(FD_NUM_BLOCKS)
#
0x00000000|0x00008000
DATA = {
!if $(ARCH) == AARCH64
0x01, 0x00, 0x00, 0x10, # code0: adr x1, .
0xff, 0x1f, 0x00, 0x14, # code1: b 0x8000
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB
@ -76,27 +75,6 @@ DATA = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4
0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"
0x00, 0x00, 0x00, 0x00 # res5
!else
0x08, 0x10, 0x4f, 0xe2, # adr r1, .
0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0xf6, 0x1f, 0x00, 0xea, # b 0x8000
0x18, 0x28, 0x6f, 0x01, # magic
0x00, 0x00, 0x00, 0x00, # start
!if $(FD_SIZE_IN_MB) == 2
0x00, 0x00, 0x20, 0x00, # image size: 2 MB
!endif
!if $(FD_SIZE_IN_MB) == 3
0x00, 0x00, 0x30, 0x00, # image size: 3 MB
!endif
0x01, 0x02, 0x03, 0x04 # endiannness flag
!endif
}
0x00008000|$(FVMAIN_COMPACT_SIZE)

View file

@ -6,11 +6,4 @@
#
[Defines]
# Dynamic stack cookies are not supported on ARM
!if $(ARCH) == ARM
DEFINE CUSTOM_STACK_CHECK_LIB = STATIC
!else
DEFINE CUSTOM_STACK_CHECK_LIB = DYNAMIC
!endif

View file

@ -18,7 +18,7 @@
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/ArmVirtXen-$(ARCH)
SUPPORTED_ARCHITECTURES = AARCH64|ARM
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = ArmVirtPkg/ArmVirtXen.fdf

View file

@ -60,7 +60,6 @@ NumBlocks = $(FD_NUM_BLOCKS)
#
0x00000000|0x00002000
DATA = {
!if $(ARCH) == AARCH64
0x01, 0x00, 0x00, 0x10, # code0: adr x1, .
0xff, 0x07, 0x00, 0x14, # code1: b 0x2000
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB
@ -76,27 +75,6 @@ DATA = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4
0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"
0x00, 0x00, 0x00, 0x00 # res5
!else
0x08, 0x10, 0x4f, 0xe2, # adr r1, .
0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0x00, 0x00, 0xa0, 0xe1, # nop
0xf6, 0x07, 0x00, 0xea, # b 0x2000
0x18, 0x28, 0x6f, 0x01, # magic
0x00, 0x00, 0x00, 0x00, # start
!if $(FD_SIZE_IN_MB) == 2
0x00, 0x00, 0x20, 0x00, # image size: 2 MB
!endif
!if $(FD_SIZE_IN_MB) == 3
0x00, 0x00, 0x30, 0x00, # image size: 3 MB
!endif
0x01, 0x02, 0x03, 0x04 # endiannness flag
!endif
}
0x00002000|$(FVMAIN_COMPACT_SIZE)
@ -195,10 +173,8 @@ READ_LOCK_STATUS = TRUE
# ACPI support
#
INF ArmVirtPkg/XenPlatformHasAcpiDtDxe/XenPlatformHasAcpiDtDxe.inf
!if $(ARCH) == AARCH64
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
INF ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
!endif
#
# Ramdisk support

View file

@ -31,9 +31,7 @@
[Sources.common]
ArmPlatformLibQemu.c
IdMap.S
[Sources.AArch64]
AArch64/ArmPlatformHelper.S
ArmPlatformHelper.S
[FixedPcd]
gArmTokenSpaceGuid.PcdArmPrimaryCoreMask

View file

@ -20,7 +20,7 @@
# The following information is for reference only and not required by the build
# tools.
#
# VALID_ARCHITECTURES = AARCH64 ARM
# VALID_ARCHITECTURES = AARCH64
#
[Sources]

View file

@ -50,27 +50,6 @@ jobs:
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_ARM_DEBUG:
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "DEBUG"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_ARM_RELEASE:
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "RELEASE"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_ARM_NOOPT:
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_KERNEL_AARCH64_DEBUG:
Build.File: "$(package)/PlatformCI/QemuKernelBuild.py"
@ -93,27 +72,6 @@ jobs:
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_KERNEL_ARM_DEBUG:
Build.File: "$(package)/PlatformCI/QemuKernelBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "DEBUG"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_KERNEL_ARM_RELEASE:
Build.File: "$(package)/PlatformCI/QemuKernelBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "RELEASE"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_KERNEL_ARM_NOOPT:
Build.File: "$(package)/PlatformCI/QemuKernelBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)
KVMTOOL_AARCH64_DEBUG:
Build.File: "$(package)/PlatformCI/KvmToolBuild.py"
@ -127,18 +85,6 @@ jobs:
Build.Flags: ""
Build.Target: "RELEASE"
Run: false
KVMTOOL_ARM_DEBUG:
Build.File: "$(package)/PlatformCI/KvmToolBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "DEBUG"
Run: false
KVMTOOL_ARM_RELEASE:
Build.File: "$(package)/PlatformCI/KvmToolBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "RELEASE"
Run: false
CLOUDHV_AARCH64_DEBUG:
Build.File: "$(package)/PlatformCI/CloudHvBuild.py"

View file

@ -19,7 +19,7 @@ class CommonPlatform():
for the different parts of stuart
'''
PackagesSupported = ("ArmVirtPkg",)
ArchSupported = ("AARCH64", "ARM")
ArchSupported = ("AARCH64",)
TargetsSupported = ("DEBUG", "RELEASE")
Scopes = ('armvirt', 'edk2-build')
WorkspaceRoot = os.path.realpath(os.path.join(

View file

@ -57,7 +57,6 @@ class SettingsManager(UpdateSettingsManager, SetupSettingsManager, PrEvalSetting
ret = RunCmd("git", "config --file .gitmodules --get-regexp path", workingdir=self.GetWorkspaceRoot(), outstream=result)
# Cmd output is expected to look like:
# submodule.CryptoPkg/Library/OpensslLib/openssl.path CryptoPkg/Library/OpensslLib/openssl
# submodule.SoftFloat.path ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
if ret == 0:
for line in result.getvalue().splitlines():
_, _, path = line.partition(" ")
@ -94,8 +93,6 @@ class SettingsManager(UpdateSettingsManager, SetupSettingsManager, PrEvalSetting
if GetHostInfo().os.upper() == "LINUX" and ActualToolChainTag.upper().startswith("GCC"):
if "AARCH64" in self.ActualArchitectures:
scopes += ("gcc_aarch64_linux",)
if "ARM" in self.ActualArchitectures:
scopes += ("gcc_arm_linux",)
return scopes
def FilterPackagesToTest(self, changedFilesList: list, potentialPackagesList: list) -> list:
@ -168,8 +165,6 @@ class PlatformBuilder(UefiBuilder, BuildSettingsManager):
if GetHostInfo().os.upper() == "LINUX" and ActualToolChainTag.upper().startswith("GCC"):
if "AARCH64" == Arch:
scopes += ("gcc_aarch64_linux",)
elif "ARM" == Arch:
scopes += ("gcc_arm_linux",)
return scopes
def GetName(self):
@ -236,10 +231,6 @@ class PlatformBuilder(UefiBuilder, BuildSettingsManager):
cmd = "qemu-system-aarch64"
args = "-M virt"
args += " -cpu neoverse-n2" # emulate cpu
elif(self.env.GetValue("TARGET_ARCH").upper() == "ARM"):
cmd = "qemu-system-arm"
args = "-M virt,highmem=off"
args += " -cpu cortex-a15" # emulate cpu
else:
raise NotImplementedError()

View file

@ -19,7 +19,7 @@ class CommonPlatform():
for the different parts of stuart
'''
PackagesSupported = ("ArmVirtPkg",)
ArchSupported = ("AARCH64", "ARM")
ArchSupported = ("AARCH64",)
TargetsSupported = ("DEBUG", "RELEASE", "NOOPT")
Scopes = ('armvirt', 'edk2-build')
WorkspaceRoot = os.path.realpath(os.path.join(

View file

@ -19,7 +19,7 @@ class CommonPlatform():
for the different parts of stuart
'''
PackagesSupported = ("ArmVirtPkg",)
ArchSupported = ("AARCH64", "ARM")
ArchSupported = ("AARCH64",)
TargetsSupported = ("DEBUG", "RELEASE", "NOOPT")
Scopes = ('armvirt', 'edk2-build')
WorkspaceRoot = os.path.realpath(os.path.join(

View file

@ -12,15 +12,10 @@ supported.
| Configuration name | Architecture | DSC File | Additional Flags |
| :---------- | :----- | :----- | :---- |
| AARCH64 - KVM Cloud HV | AARCH64 | ArmVirtCloudHv.dsc | None |
| ARM - KVM Cloud HV | ARM | ArmVirtCloudHv.dsc | None |
| AARCH64 - kvmtool | AARCH64 | ArmVirtKvmTool.dsc | None |
| ARM - kvmtool | ARM | ArmVirtKvmTool.dsc | None |
| AARCH64 - QEMU | AARCH64 | ArmVirtQemu.dsc | None |
| ARM - QEMU | ARM | ArmVirtQemu.dsc | None |
| AARCH64 - QEMU Kernel | AARCH64 | ArmVirtQemuKernel.dsc | None |
| ARM - QEMU Kernel | ARM | ArmVirtQemuKernel.dsc | None |
| AARCH64 - Xen HV | AARCH64 | ArmVirtXen.dsc | None |
| ARM - Xen HV | ARM | ArmVirtXen.dsc | None |
## EDK2 Developer environment

View file

@ -1,16 +0,0 @@
/** @file
*
* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
**/
#include "PrePi.h"
VOID
ArchInitialize (
VOID
)
{
}

View file

@ -1,188 +0,0 @@
//
// Copyright (c) 2011-2013, ARM Limited. All rights reserved.
// Copyright (c) 2015-2016, Linaro Limited. All rights reserved.
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
//
#include <AsmMacroLib.h>
ASM_FUNC(_ModuleEntryPoint)
// Do early platform specific actions
bl ASM_PFX(ArmPlatformPeiBootAction)
#if (FixedPcdGet32 (PcdVFPEnabled))
// Enable Floating Point. AArch64 uses hardfloat ABI so needs this done before
// calling any C code. Arm does not, but let's keep the ports aligned.
bl ArmEnableVFP
#endif
// Get ID of this CPU in Multicore system
bl ASM_PFX(ArmReadMpidr)
// Keep a copy of the MpId register value
mov r10, r0
// Check if we can install the stack at the top of the System Memory or if we need
// to install the stacks at the bottom of the Firmware Device (case the FD is located
// at the top of the DRAM)
_SetupStackPosition:
// Compute Top of System Memory
LDRL (r1, PcdGet64 (PcdSystemMemoryBase))
ADRL (r12, PcdGet64 (PcdSystemMemorySize))
ldrd r2, r3, [r12]
// calculate the top of memory
adds r2, r2, r1
sub r2, r2, #1
addcs r3, r3, #1
// truncate the memory used by UEFI to 4 GB range
teq r3, #0
movne r1, #-1
moveq r1, r2
// Calculate Top of the Firmware Device
LDRL (r2, PcdGet64 (PcdFdBaseAddress))
MOV32 (r3, FixedPcdGet32 (PcdFdSize) - 1)
add r3, r3, r2 // r3 = FdTop = PcdFdBaseAddress + PcdFdSize
// UEFI Memory Size (stacks are allocated in this region)
MOV32 (r4, FixedPcdGet32(PcdSystemMemoryUefiRegionSize))
//
// Reserve the memory for the UEFI region (contain stacks on its top)
//
// Calculate how much space there is between the top of the Firmware and the Top of the System Memory
subs r0, r1, r3 // r0 = SystemMemoryTop - FdTop
bmi _SetupStack // Jump if negative (FdTop > SystemMemoryTop). Case when the PrePi is in XIP memory outside of the DRAM
cmp r0, r4
bge _SetupStack
// Case the top of stacks is the FdBaseAddress
mov r1, r2
_SetupStack:
// r1 contains the top of the stack (and the UEFI Memory)
// Because the 'push' instruction is equivalent to 'stmdb' (decrement before), we need to increment
// one to the top of the stack. We check if incrementing one does not overflow (case of DRAM at the
// top of the memory space)
adds r11, r1, #1
bcs _SetupOverflowStack
_SetupAlignedStack:
mov r1, r11
b _GetBaseUefiMemory
_SetupOverflowStack:
// Case memory at the top of the address space. Ensure the top of the stack is EFI_PAGE_SIZE
// aligned (4KB)
MOV32 (r11, (~EFI_PAGE_MASK) & 0xffffffff)
and r1, r1, r11
_GetBaseUefiMemory:
// Calculate the Base of the UEFI Memory
sub r11, r1, r4
_GetStackBase:
// r1 = The top of the Mpcore Stacks
mov sp, r1
// Stack for the primary core = PrimaryCoreStack
MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
sub r9, r1, r2
mov r0, r10
mov r1, r11
mov r2, r9
// Jump to PrePiCore C code
// r0 = MpId
// r1 = UefiMemoryBase
// r2 = StacksBase
bl ASM_PFX(CEntryPoint)
_NeverReturn:
b _NeverReturn
ASM_PFX(ArmPlatformPeiBootAction):
//
// If we are booting from RAM using the Linux kernel boot protocol, r0 will
// point to the DTB image in memory. Otherwise, use the default value defined
// by the platform.
//
teq r0, #0
bne 0f
LDRL (r0, PcdGet64 (PcdDeviceTreeInitialBaseAddress))
0:mov r11, r14 // preserve LR
mov r10, r0 // preserve DTB pointer
mov r9, r1 // preserve base of image pointer
//
// The base of the runtime image has been preserved in r1. Check whether
// the expected magic number can be found in the header.
//
ldr r8, .LArm32LinuxMagic
ldr r7, [r1, #0x24]
cmp r7, r8
bne .Lout
//
//
// OK, so far so good. We have confirmed that we likely have a DTB and are
// booting via the ARM Linux boot protocol. Update the base-of-image PCD
// to the actual relocated value, and add the shift of PcdFdBaseAddress to
// PcdFvBaseAddress as well
//
ADRL (r8, PcdGet64 (PcdFdBaseAddress))
ADRL (r7, PcdGet64 (PcdFvBaseAddress))
ldr r6, [r8]
ldr r5, [r7]
sub r5, r5, r6
add r5, r5, r1
str r1, [r8]
str r5, [r7]
//
// The runtime address may be different from the link time address so fix
// up the PE/COFF relocations. Since we are calling a C function, use the
// window at the beginning of the FD image as a temp stack.
//
mov r0, r5
ADRL (r1, PeCoffLoaderImageReadFromMemory)
mov sp, r5
bl RelocatePeCoffImage
//
// Discover the memory size and offset from the DTB, and record in the
// respective PCDs. This will also return false if a corrupt DTB is
// encountered.
//
mov r0, r10
ADRL (r1, PcdGet64 (PcdSystemMemoryBase))
ADRL (r2, PcdGet64 (PcdSystemMemorySize))
bl FindMemnode
teq r0, #0
beq .Lout
//
// Copy the DTB to the slack space right after the 64 byte arm64/Linux style
// image header at the base of this image (defined in the FDF), and record the
// pointer in PcdDeviceTreeInitialBaseAddress.
//
ADRL (r8, PcdGet64 (PcdDeviceTreeInitialBaseAddress))
add r9, r9, #0x40
str r9, [r8]
mov r0, r9
mov r1, r10
bl CopyFdt
.Lout:
bx r11
.LArm32LinuxMagic:
.byte 0x18, 0x28, 0x6f, 0x01

View file

@ -19,14 +19,8 @@
FdtParser.c
PrePi.c
PrePi.h
[Sources.AArch64]
AArch64/ArchPrePi.c
AArch64/ModuleEntryPoint.S
[Sources.ARM]
Arm/ArchPrePi.c
Arm/ModuleEntryPoint.S
ArchPrePi.c
ModuleEntryPoint.S
[Packages]
MdePkg/MdePkg.dec
@ -85,9 +79,6 @@
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData
[FixedPcd.ARM]
gArmTokenSpaceGuid.PcdVFPEnabled
[Pcd]
gArmTokenSpaceGuid.PcdSystemMemoryBase
gArmTokenSpaceGuid.PcdSystemMemorySize