From b471ed29694c375ea1b6b484eb71af73ed61fece Mon Sep 17 00:00:00 2001 From: Oliver Smith-Denny Date: Mon, 25 Aug 2025 15:25:12 -0700 Subject: [PATCH] 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 --- ArmVirtPkg/ArmVirt.dsc.inc | 27 +-- ArmVirtPkg/ArmVirtCloudHv.dsc | 6 +- ArmVirtPkg/ArmVirtCloudHv.fdf | 6 - ArmVirtPkg/ArmVirtKvmTool.dsc | 9 +- ArmVirtPkg/ArmVirtKvmTool.fdf | 19 -- ArmVirtPkg/ArmVirtQemu.dsc | 12 +- ArmVirtPkg/ArmVirtQemu.fdf | 4 - ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 2 - ArmVirtPkg/ArmVirtQemuKernel.dsc | 4 +- ArmVirtPkg/ArmVirtQemuKernel.fdf | 22 -- ArmVirtPkg/ArmVirtStackCookies.dsc.inc | 7 - ArmVirtPkg/ArmVirtXen.dsc | 2 +- ArmVirtPkg/ArmVirtXen.fdf | 24 --- .../{AArch64 => }/ArmPlatformHelper.S | 0 .../ArmPlatformLibQemu/ArmPlatformLibQemu.inf | 4 +- .../ArmVirtPciHostBridgeUtilityLib.inf | 2 +- .../PlatformCI/.azurepipelines/Ubuntu-GCC.yml | 54 ----- ArmVirtPkg/PlatformCI/KvmToolBuild.py | 2 +- ArmVirtPkg/PlatformCI/PlatformBuildLib.py | 9 - ArmVirtPkg/PlatformCI/QemuBuild.py | 2 +- ArmVirtPkg/PlatformCI/QemuKernelBuild.py | 2 +- ArmVirtPkg/PlatformCI/ReadMe.md | 5 - ArmVirtPkg/PrePi/{AArch64 => }/ArchPrePi.c | 0 ArmVirtPkg/PrePi/Arm/ArchPrePi.c | 16 -- ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S | 188 ------------------ .../PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 13 +- .../PrePi/{AArch64 => }/ModuleEntryPoint.S | 0 27 files changed, 20 insertions(+), 421 deletions(-) rename ArmVirtPkg/Library/ArmPlatformLibQemu/{AArch64 => }/ArmPlatformHelper.S (100%) rename ArmVirtPkg/PrePi/{AArch64 => }/ArchPrePi.c (100%) delete mode 100644 ArmVirtPkg/PrePi/Arm/ArchPrePi.c delete mode 100644 ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S rename ArmVirtPkg/PrePi/{AArch64 => }/ModuleEntryPoint.S (100%) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 2dc36d69d6..643620371b 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -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 # diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc index 94a4ff10e4..2dfd286e25 100644 --- a/ArmVirtPkg/ArmVirtCloudHv.dsc +++ b/ArmVirtPkg/ArmVirtCloudHv.dsc @@ -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 { diff --git a/ArmVirtPkg/ArmVirtCloudHv.fdf b/ArmVirtPkg/ArmVirtCloudHv.fdf index 7bad8ed0b2..09f6b77343 100644 --- a/ArmVirtPkg/ArmVirtCloudHv.fdf +++ b/ArmVirtPkg/ArmVirtCloudHv.fdf @@ -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 diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc index 9d0411d9e0..62ee806a09 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -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 diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf index b20ef9c844..ede74c08a8 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.fdf +++ b/ArmVirtPkg/ArmVirtKvmTool.fdf @@ -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) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index c8e8ab2b05..5e6ad0654b 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -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 diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf index 1e45d51729..fc502d19d2 100644 --- a/ArmVirtPkg/ArmVirtQemu.fdf +++ b/ArmVirtPkg/ArmVirtQemu.fdf @@ -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) diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc index e25d6bbe07..df9fa67ddf 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -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 diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index eee9590a7e..ff424be552 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -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 diff --git a/ArmVirtPkg/ArmVirtQemuKernel.fdf b/ArmVirtPkg/ArmVirtQemuKernel.fdf index 55e33aba0d..a6df034da1 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.fdf +++ b/ArmVirtPkg/ArmVirtQemuKernel.fdf @@ -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) diff --git a/ArmVirtPkg/ArmVirtStackCookies.dsc.inc b/ArmVirtPkg/ArmVirtStackCookies.dsc.inc index 788fdccc16..93053afe7c 100644 --- a/ArmVirtPkg/ArmVirtStackCookies.dsc.inc +++ b/ArmVirtPkg/ArmVirtStackCookies.dsc.inc @@ -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 - diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc index 55f418238c..2ec264a15e 100644 --- a/ArmVirtPkg/ArmVirtXen.dsc +++ b/ArmVirtPkg/ArmVirtXen.dsc @@ -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 diff --git a/ArmVirtPkg/ArmVirtXen.fdf b/ArmVirtPkg/ArmVirtXen.fdf index d149f9b6d5..dc692ff359 100644 --- a/ArmVirtPkg/ArmVirtXen.fdf +++ b/ArmVirtPkg/ArmVirtXen.fdf @@ -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 diff --git a/ArmVirtPkg/Library/ArmPlatformLibQemu/AArch64/ArmPlatformHelper.S b/ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformHelper.S similarity index 100% rename from ArmVirtPkg/Library/ArmPlatformLibQemu/AArch64/ArmPlatformHelper.S rename to ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformHelper.S diff --git a/ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformLibQemu.inf b/ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformLibQemu.inf index b2ecdfa061..040497bdb2 100644 --- a/ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformLibQemu.inf +++ b/ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformLibQemu.inf @@ -31,9 +31,7 @@ [Sources.common] ArmPlatformLibQemu.c IdMap.S - -[Sources.AArch64] - AArch64/ArmPlatformHelper.S + ArmPlatformHelper.S [FixedPcd] gArmTokenSpaceGuid.PcdArmPrimaryCoreMask diff --git a/ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf b/ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf index 80fdd2b1e5..3f6f6193b9 100644 --- a/ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf +++ b/ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf @@ -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] diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC.yml b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC.yml index 4a63b501b6..b3c7aa1222 100644 --- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC.yml +++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC.yml @@ -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" diff --git a/ArmVirtPkg/PlatformCI/KvmToolBuild.py b/ArmVirtPkg/PlatformCI/KvmToolBuild.py index 4d02dba124..d43cfd5c15 100644 --- a/ArmVirtPkg/PlatformCI/KvmToolBuild.py +++ b/ArmVirtPkg/PlatformCI/KvmToolBuild.py @@ -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( diff --git a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py index 3ba6dea561..6895677d43 100644 --- a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py +++ b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py @@ -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() diff --git a/ArmVirtPkg/PlatformCI/QemuBuild.py b/ArmVirtPkg/PlatformCI/QemuBuild.py index c651a9501f..bf3c7b3e2f 100644 --- a/ArmVirtPkg/PlatformCI/QemuBuild.py +++ b/ArmVirtPkg/PlatformCI/QemuBuild.py @@ -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( diff --git a/ArmVirtPkg/PlatformCI/QemuKernelBuild.py b/ArmVirtPkg/PlatformCI/QemuKernelBuild.py index f340dfac88..f62bf3d428 100644 --- a/ArmVirtPkg/PlatformCI/QemuKernelBuild.py +++ b/ArmVirtPkg/PlatformCI/QemuKernelBuild.py @@ -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( diff --git a/ArmVirtPkg/PlatformCI/ReadMe.md b/ArmVirtPkg/PlatformCI/ReadMe.md index 4e3709492b..b9196253d9 100644 --- a/ArmVirtPkg/PlatformCI/ReadMe.md +++ b/ArmVirtPkg/PlatformCI/ReadMe.md @@ -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 diff --git a/ArmVirtPkg/PrePi/AArch64/ArchPrePi.c b/ArmVirtPkg/PrePi/ArchPrePi.c similarity index 100% rename from ArmVirtPkg/PrePi/AArch64/ArchPrePi.c rename to ArmVirtPkg/PrePi/ArchPrePi.c diff --git a/ArmVirtPkg/PrePi/Arm/ArchPrePi.c b/ArmVirtPkg/PrePi/Arm/ArchPrePi.c deleted file mode 100644 index 47ca755599..0000000000 --- a/ArmVirtPkg/PrePi/Arm/ArchPrePi.c +++ /dev/null @@ -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 - ) -{ -} diff --git a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S deleted file mode 100644 index 3e94c49447..0000000000 --- a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S +++ /dev/null @@ -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 - -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 diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf index b1b9dcd0e4..54db084d79 100755 --- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf +++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf @@ -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 diff --git a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/ModuleEntryPoint.S similarity index 100% rename from ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S rename to ArmVirtPkg/PrePi/ModuleEntryPoint.S