]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/PrePeiCore: remove global variable allocation from lowlevel init
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 27 Nov 2015 17:07:31 +0000 (17:07 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Fri, 27 Nov 2015 17:07:31 +0000 (17:07 +0000)
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 <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18994 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/PrePeiCore/AArch64/PrePeiCoreEntryPoint.S
ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S
ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm
ArmPlatformPkg/PrePeiCore/PrePeiCore.c
ArmPlatformPkg/PrePeiCore/PrePeiCore.h
ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf

index b84190cf3fd48fd9d028b9c4950fc406ea07d33c..85d3450f62e4669fdd9dc95bee9b2f61a2e50694 100644 (file)
@@ -101,10 +101,5 @@ _PrepareArguments:
   blr   x3\r
 \r
 _SetupPrimaryCoreStack:\r
-  // x1 contains the top of the primary stack\r
-  LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), x2)\r
-\r
-  // The reserved space for global variable must be 16-bytes aligned for pushing\r
-  // 128-bit variable on the stack\r
-  SetPrimaryStack (x1, x2, x3, x4)\r
+  mov   sp, x1\r
   b     _PrepareArguments\r
index a6f19aff0f8ef1f7122b404d0a3d221485bc82d1..ba1bd09b67c7a54e2e30077c112d43da4c2b7df0 100644 (file)
@@ -82,12 +82,7 @@ _PrepareArguments:
   blx   r3\r
 \r
 _SetupPrimaryCoreStack:\r
-  // r1 contains the top of the primary stack\r
-  LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), r2)\r
-\r
-  // The reserved space for global variable must be 8-bytes aligned for pushing\r
-  // 64-bit variable on the stack\r
-  SetPrimaryStack (r1, r2, r3)\r
+  mov   sp, r1\r
   b     _PrepareArguments\r
 \r
 _NeverReturn:\r
index edf479ff43e5ff56acc881334db4ef8fd469953f..c316379f05380d6d6e8fed051d3a1b7db37d6aee 100644 (file)
@@ -84,12 +84,7 @@ _PrepareArguments
   blx   r3\r
 \r
 _SetupPrimaryCoreStack\r
-  // r1 contains the top of the primary stack\r
-  LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), r2)\r
-\r
-  // The reserved space for global variable must be 8-bytes aligned for pushing\r
-  // 64-bit variable on the stack\r
-  SetPrimaryStack (r1, r2, r3)\r
+  mov   sp, r1\r
   b     _PrepareArguments\r
 \r
 _NeverReturn\r
index 491d7a6f851f8433d0107273ddc7311fd10ffe6f..65b07b6d894112d7380b25a758335179a751d55d 100644 (file)
 #include <Library/DebugAgentLib.h>\r
 #include <Library/ArmLib.h>\r
 \r
-#include <Ppi/ArmGlobalVariable.h>\r
-\r
 #include "PrePeiCore.h"\r
 \r
 CONST EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI   mTemporaryRamSupportPpi = { PrePeiCoreTemporaryRamSupport };\r
-CONST ARM_GLOBAL_VARIABLE_PPI             mGlobalVariablePpi = { PrePeiCoreGetGlobalVariableMemory };\r
 \r
 CONST EFI_PEI_PPI_DESCRIPTOR      gCommonPpiTable[] = {\r
   {\r
     EFI_PEI_PPI_DESCRIPTOR_PPI,\r
     &gEfiTemporaryRamSupportPpiGuid,\r
     (VOID *) &mTemporaryRamSupportPpi\r
-  },\r
-  {\r
-    EFI_PEI_PPI_DESCRIPTOR_PPI,\r
-    &gArmGlobalVariablePpiGuid,\r
-    (VOID *) &mGlobalVariablePpi\r
   }\r
 };\r
 \r
@@ -146,18 +138,3 @@ PrePeiCoreTemporaryRamSupport (
 \r
   return EFI_SUCCESS;\r
 }\r
-\r
-EFI_STATUS\r
-PrePeiCoreGetGlobalVariableMemory (\r
-  OUT EFI_PHYSICAL_ADDRESS    *GlobalVariableBase\r
-  )\r
-{\r
-  ASSERT (GlobalVariableBase != NULL);\r
-\r
-  *GlobalVariableBase = (UINTN)PcdGet64 (PcdCPUCoresStackBase) +\r
-                        (UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) -\r
-                        (UINTN)PcdGet32 (PcdPeiGlobalVariableSize);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
index 20684e2f904c04afb1160b52802b5b6cdbac9505..160894620ce45c8d76bbe2e8802cc5b87db66f85 100644 (file)
@@ -40,11 +40,6 @@ PrePeiCoreTemporaryRamSupport (
   IN UINTN                    CopySize\r
   );\r
 \r
-EFI_STATUS\r
-PrePeiCoreGetGlobalVariableMemory (\r
-  OUT EFI_PHYSICAL_ADDRESS    *GlobalVariableBase\r
-  );\r
-\r
 VOID\r
 SecSwitchStack (\r
   INTN    StackDelta\r
index 5ba0231a3e4bad26001399954fa32ca8213445d4..ecdbccb8d620018a5ffb95baa3b70ac03de13740 100644 (file)
@@ -59,7 +59,6 @@
 \r
 [Ppis]\r
   gEfiTemporaryRamSupportPpiGuid\r
-  gArmGlobalVariablePpiGuid\r
   gArmMpCoreInfoPpiGuid\r
 \r
 [FeaturePcd]\r
@@ -73,8 +72,6 @@
   gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize\r
   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize\r
 \r
-  gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize\r
-\r
   gArmTokenSpaceGuid.PcdGicDistributorBase\r
   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase\r
   gArmTokenSpaceGuid.PcdGicSgiIntId\r
index d677f150e99014172e1f0c758b520ede66a710c9..b5d4e389b2a4208eab3db23f6f93c8b6c8ebe878 100644 (file)
@@ -58,7 +58,6 @@
 \r
 [Ppis]\r
   gEfiTemporaryRamSupportPpiGuid\r
-  gArmGlobalVariablePpiGuid\r
 \r
 [FeaturePcd]\r
   gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores\r
@@ -70,5 +69,3 @@
   gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase\r
   gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize\r
   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize\r
-\r
-  gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize\r