SecurityPkg: Drop ARM32 Support

edk2 is dropping support for the ARM32 architecture. This
commit removes ARM32 code in SecurityPkg.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
This commit is contained in:
Oliver Smith-Denny
2025-09-15 07:51:59 -07:00
committed by mergify[bot]
parent 9c657c3685
commit 08ae634ccb
5 changed files with 10 additions and 68 deletions

View File

@ -36,7 +36,7 @@
[Sources.IA32, Sources.X64]
StandaloneMmTcg2PhysicalPresenceLib.c
[Sources.ARM, Sources.AARCH64]
[Sources.AARCH64]
StandaloneMmTcg2PhysicalPresenceLibArm.c
[Packages]
@ -64,7 +64,7 @@
[Pcd]
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2PhysicalPresenceFlags ## SOMETIMES_CONSUMES
[Pcd.ARM, Pcd.AARCH64]
[Pcd.AARCH64]
gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer
[Depex]

View File

@ -1,51 +0,0 @@
/** @file
Arm specific code.
Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/ArmTrngLib.h>
#include "RngDxeInternals.h"
// Maximum number of Rng algorithms.
#define RNG_AVAILABLE_ALGO_MAX 1
/** Allocate and initialize mAvailableAlgoArray with the available
Rng algorithms. Also update mAvailableAlgoArrayCount.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_OUT_OF_RESOURCES Could not allocate memory.
**/
EFI_STATUS
EFIAPI
GetAvailableAlgorithms (
VOID
)
{
UINT16 MajorRevision;
UINT16 MinorRevision;
// Rng algorithms 2 times, one for the allocation, one to populate.
mAvailableAlgoArray = AllocateZeroPool (RNG_AVAILABLE_ALGO_MAX * sizeof (EFI_RNG_ALGORITHM));
if (mAvailableAlgoArray == NULL) {
return EFI_OUT_OF_RESOURCES;
}
// Raw algorithm (Trng)
if (!EFI_ERROR (GetArmTrngVersion (&MajorRevision, &MinorRevision))) {
CopyMem (
&mAvailableAlgoArray[mAvailableAlgoArrayCount],
&gEfiRngAlgorithmRaw,
sizeof (EFI_RNG_ALGORITHM)
);
mAvailableAlgoArrayCount++;
}
return EFI_SUCCESS;
}

View File

@ -28,7 +28,7 @@
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 AARCH64 ARM
# VALID_ARCHITECTURES = IA32 X64 AARCH64
#
[Sources.common]
@ -41,16 +41,13 @@
Rand/AesCore.c
Rand/AesCore.h
[Sources.AARCH64, Sources.ARM]
[Sources.AARCH64]
ArmRngDxe.c
ArmTrng.c
[Sources.AARCH64]
AArch64/AArch64Algo.c
[Sources.ARM]
Arm/ArmAlgo.c
[Packages]
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
@ -65,7 +62,7 @@
TimerLib
RngLib
[LibraryClasses.AARCH64, LibraryClasses.ARM]
[LibraryClasses.AARCH64]
ArmTrngLib
[Guids]

View File

@ -15,7 +15,7 @@
PLATFORM_VERSION = 0.98
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/SecurityPkg
SUPPORTED_ARCHITECTURES = IA32|X64|EBC|ARM|AARCH64|RISCV64|LOONGARCH64
SUPPORTED_ARCHITECTURES = IA32|X64|EBC|AARCH64|RISCV64|LOONGARCH64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
@ -89,15 +89,12 @@
PlatformLibWrapper|SecurityPkg/DeviceSecurity/OsStub/PlatformLibWrapper/PlatformLibWrapper.inf
MemLibWrapper|SecurityPkg/DeviceSecurity/OsStub/MemLibWrapper/MemLibWrapper.inf
[LibraryClasses.ARM, LibraryClasses.AARCH64]
[LibraryClasses.AARCH64]
ArmTrngLib|MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.inf
ArmSmcLib|MdePkg/Library/ArmSmcLib/ArmSmcLib.inf
ArmSvcLib|MdePkg/Library/ArmSvcLib/ArmSvcLib.inf
ArmFfaLib|MdeModulePkg/Library/ArmFfaLib/ArmFfaPeiLib.inf
[LibraryClasses.ARM]
RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
[LibraryClasses.RISCV64]
RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
@ -281,14 +278,14 @@
SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf
SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLogRecordLib.inf
[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
[Components.IA32, Components.X64, Components.AARCH64]
SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf
SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf
SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf
SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf
SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBootDefaultKeysDxe.inf
[Components.IA32, Components.X64, Components.AARCH64, Components.ARM]
[Components.IA32, Components.X64, Components.AARCH64]
#
# Random Number Generator
#

View File

@ -1798,8 +1798,7 @@ LoadPeImage (
// Note the size of FileHeader field is constant for both IA32 and X64 arch
//
if ( (NtHeader32->FileHeader.Machine == EFI_IMAGE_MACHINE_IA32)
|| (NtHeader32->FileHeader.Machine == EFI_IMAGE_MACHINE_EBC)
|| (NtHeader32->FileHeader.Machine == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED))
|| (NtHeader32->FileHeader.Machine == EFI_IMAGE_MACHINE_EBC))
{
//
// 32-bits Architecture