From 982aa6a18e888e4b6bf2789f05468784200d599a Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 27 Nov 2015 17:07:43 +0000 Subject: ArmPlatformPkg/Sec: 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 Sec 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@18995 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S | 6 +----- ArmPlatformPkg/Sec/Arm/SecEntryPoint.S | 6 +----- ArmPlatformPkg/Sec/Arm/SecEntryPoint.asm | 6 +----- ArmPlatformPkg/Sec/Sec.inf | 2 -- 4 files changed, 3 insertions(+), 17 deletions(-) (limited to 'ArmPlatformPkg') diff --git a/ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S b/ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S index 3512ccd84d..000b56f573 100644 --- a/ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S +++ b/ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S @@ -99,11 +99,7 @@ _SetupPrimaryCoreStack: LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecPrimaryStackSize), x2) add x1, x1, x2 - LoadConstantToReg (FixedPcdGet32(PcdSecGlobalVariableSize), x2) - - // The reserved space for global variable must be 8-bytes aligned for pushing - // 64-bit variable on the stack - SetPrimaryStack (x1, x2, x3, x4) + mov sp, x1 b _PrepareArguments _SetupSecondaryCoreStack: diff --git a/ArmPlatformPkg/Sec/Arm/SecEntryPoint.S b/ArmPlatformPkg/Sec/Arm/SecEntryPoint.S index 51b91b965d..73c264810e 100644 --- a/ArmPlatformPkg/Sec/Arm/SecEntryPoint.S +++ b/ArmPlatformPkg/Sec/Arm/SecEntryPoint.S @@ -81,11 +81,7 @@ _SetupPrimaryCoreStack: LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecPrimaryStackSize), r2) add r1, r1, r2 - LoadConstantToReg (FixedPcdGet32(PcdSecGlobalVariableSize), 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 _SetupSecondaryCoreStack: diff --git a/ArmPlatformPkg/Sec/Arm/SecEntryPoint.asm b/ArmPlatformPkg/Sec/Arm/SecEntryPoint.asm index b30fab2141..c0cd410699 100644 --- a/ArmPlatformPkg/Sec/Arm/SecEntryPoint.asm +++ b/ArmPlatformPkg/Sec/Arm/SecEntryPoint.asm @@ -83,11 +83,7 @@ _SetupPrimaryCoreStack LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecPrimaryStackSize), r2) add r1, r1, r2 - LoadConstantToReg (FixedPcdGet32(PcdSecGlobalVariableSize), 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 _SetupSecondaryCoreStack diff --git a/ArmPlatformPkg/Sec/Sec.inf b/ArmPlatformPkg/Sec/Sec.inf index 7c6e7ffba1..7f7243f98f 100644 --- a/ArmPlatformPkg/Sec/Sec.inf +++ b/ArmPlatformPkg/Sec/Sec.inf @@ -81,7 +81,5 @@ gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase - gArmPlatformTokenSpaceGuid.PcdSecGlobalVariableSize - [FixedPcd.ARM] gArmTokenSpaceGuid.PcdArmNsacr -- cgit v1.2.3