From 3707dee3da5c58d91d64b56e4953736de69e06f6 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 27 Nov 2015 17:07:31 +0000 Subject: ArmPlatformPkg/PrePeiCore: remove global variable allocation from lowlevel init Now that we dropped all ArmPlatformGlobalVariableLib dependencies, there is no longer a need to allocate and clear out the global variable region in the PrePeiCore init code. So remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18994 6f19259b-4bc3-4df7-8a09-765794883524 --- .../PrePeiCore/AArch64/PrePeiCoreEntryPoint.S | 7 +------ .../PrePeiCore/Arm/PrePeiCoreEntryPoint.S | 7 +------ .../PrePeiCore/Arm/PrePeiCoreEntryPoint.asm | 7 +------ ArmPlatformPkg/PrePeiCore/PrePeiCore.c | 23 ---------------------- ArmPlatformPkg/PrePeiCore/PrePeiCore.h | 5 ----- ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf | 3 --- ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf | 3 --- 7 files changed, 3 insertions(+), 52 deletions(-) (limited to 'ArmPlatformPkg') diff --git a/ArmPlatformPkg/PrePeiCore/AArch64/PrePeiCoreEntryPoint.S b/ArmPlatformPkg/PrePeiCore/AArch64/PrePeiCoreEntryPoint.S index b84190cf3f..85d3450f62 100644 --- a/ArmPlatformPkg/PrePeiCore/AArch64/PrePeiCoreEntryPoint.S +++ b/ArmPlatformPkg/PrePeiCore/AArch64/PrePeiCoreEntryPoint.S @@ -101,10 +101,5 @@ _PrepareArguments: blr x3 _SetupPrimaryCoreStack: - // x1 contains the top of the primary stack - LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), x2) - - // The reserved space for global variable must be 16-bytes aligned for pushing - // 128-bit variable on the stack - SetPrimaryStack (x1, x2, x3, x4) + mov sp, x1 b _PrepareArguments diff --git a/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S index a6f19aff0f..ba1bd09b67 100644 --- a/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S +++ b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S @@ -82,12 +82,7 @@ _PrepareArguments: blx r3 _SetupPrimaryCoreStack: - // r1 contains the top of the primary stack - LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), r2) - - // The reserved space for global variable must be 8-bytes aligned for pushing - // 64-bit variable on the stack - SetPrimaryStack (r1, r2, r3) + mov sp, r1 b _PrepareArguments _NeverReturn: diff --git a/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm index edf479ff43..c316379f05 100644 --- a/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm +++ b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm @@ -84,12 +84,7 @@ _PrepareArguments blx r3 _SetupPrimaryCoreStack - // r1 contains the top of the primary stack - LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), r2) - - // The reserved space for global variable must be 8-bytes aligned for pushing - // 64-bit variable on the stack - SetPrimaryStack (r1, r2, r3) + mov sp, r1 b _PrepareArguments _NeverReturn diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c index 491d7a6f85..65b07b6d89 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c @@ -17,23 +17,15 @@ #include #include -#include - #include "PrePeiCore.h" CONST EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mTemporaryRamSupportPpi = { PrePeiCoreTemporaryRamSupport }; -CONST ARM_GLOBAL_VARIABLE_PPI mGlobalVariablePpi = { PrePeiCoreGetGlobalVariableMemory }; CONST EFI_PEI_PPI_DESCRIPTOR gCommonPpiTable[] = { { EFI_PEI_PPI_DESCRIPTOR_PPI, &gEfiTemporaryRamSupportPpiGuid, (VOID *) &mTemporaryRamSupportPpi - }, - { - EFI_PEI_PPI_DESCRIPTOR_PPI, - &gArmGlobalVariablePpiGuid, - (VOID *) &mGlobalVariablePpi } }; @@ -146,18 +138,3 @@ PrePeiCoreTemporaryRamSupport ( return EFI_SUCCESS; } - -EFI_STATUS -PrePeiCoreGetGlobalVariableMemory ( - OUT EFI_PHYSICAL_ADDRESS *GlobalVariableBase - ) -{ - ASSERT (GlobalVariableBase != NULL); - - *GlobalVariableBase = (UINTN)PcdGet64 (PcdCPUCoresStackBase) + - (UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) - - (UINTN)PcdGet32 (PcdPeiGlobalVariableSize); - - return EFI_SUCCESS; -} - diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h index 20684e2f90..160894620c 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h @@ -40,11 +40,6 @@ PrePeiCoreTemporaryRamSupport ( IN UINTN CopySize ); -EFI_STATUS -PrePeiCoreGetGlobalVariableMemory ( - OUT EFI_PHYSICAL_ADDRESS *GlobalVariableBase - ); - VOID SecSwitchStack ( INTN StackDelta diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf index 5ba0231a3e..ecdbccb8d6 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf @@ -59,7 +59,6 @@ [Ppis] gEfiTemporaryRamSupportPpiGuid - gArmGlobalVariablePpiGuid gArmMpCoreInfoPpiGuid [FeaturePcd] @@ -73,8 +72,6 @@ gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize - gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize - gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase gArmTokenSpaceGuid.PcdGicSgiIntId diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf index d677f150e9..b5d4e389b2 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf @@ -58,7 +58,6 @@ [Ppis] gEfiTemporaryRamSupportPpiGuid - gArmGlobalVariablePpiGuid [FeaturePcd] gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores @@ -70,5 +69,3 @@ gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize - - gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize -- cgit v1.2.3