summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/PrePi
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-11-27 17:06:48 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-11-27 17:06:48 +0000
commit5eeba3b7f1dd70113d8dba9292bb85b341742edf (patch)
tree89936619d434f9466762c0adfe823b30be837857 /ArmVirtPkg/PrePi
parent1856157a55e4c03f61bfd53b62be581729bb32d1 (diff)
downloadedk2-5eeba3b7f1dd70113d8dba9292bb85b341742edf.tar.gz
edk2-5eeba3b7f1dd70113d8dba9292bb85b341742edf.tar.bz2
edk2-5eeba3b7f1dd70113d8dba9292bb85b341742edf.zip
ArmVirtPkg/PrePi: 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 PrePi init code. So remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18991 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmVirtPkg/PrePi')
-rw-r--r--ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S7
-rwxr-xr-xArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf3
-rwxr-xr-xArmVirtPkg/PrePi/PrePi.c33
-rw-r--r--ArmVirtPkg/PrePi/PrePi.h1
4 files changed, 2 insertions, 42 deletions
diff --git a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
index f0cf865b3c..68049d5df2 100644
--- a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
+++ b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
@@ -158,16 +158,10 @@ _GetStackBase:
cmp x0, #1
bne _PrepareArguments
-_ReserveGlobalVariable:
- LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), x0)
- // InitializePrimaryStack($GlobalVariableSize, $Tmp1, $Tmp2)
- InitializePrimaryStack(x0, x1, x2)
-
_PrepareArguments:
mov x0, x10
mov x1, x11
mov x2, x12
- mov x3, sp
// Move sec startup address into a data register
// Ensure we're jumping to FV version of the code (not boot remapped alias)
@@ -177,7 +171,6 @@ _PrepareArguments:
// x0 = MpId
// x1 = UefiMemoryBase
// x2 = StacksBase
- // x3 = GlobalVariableBase
blr x4
_NeverReturn:
diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
index 8a7a67c1b5..966f0185bb 100755
--- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
+++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
@@ -61,7 +61,6 @@
gArmMpCoreInfoPpiGuid
[Guids]
- gArmGlobalVariableGuid
gArmMpCoreInfoGuid
[FeaturePcd]
@@ -79,8 +78,6 @@
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
- gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize
-
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
gArmPlatformTokenSpaceGuid.PcdCoreCount
diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c
index fe7612cec7..c69cff249e 100755
--- a/ArmVirtPkg/PrePi/PrePi.c
+++ b/ArmVirtPkg/PrePi/PrePi.c
@@ -25,14 +25,10 @@
#include <Ppi/GuidedSectionExtraction.h>
#include <Ppi/ArmMpCoreInfo.h>
#include <Guid/LzmaDecompress.h>
-#include <Guid/ArmGlobalVariableHob.h>
#include "PrePi.h"
#include "LzmaDecompress.h"
-// Not used when PrePi in run in XIP mode
-UINTN mGlobalVariableBase = 0;
-
EFI_STATUS
EFIAPI
ExtractGuidedSectionLibConstructor (
@@ -45,23 +41,6 @@ LzmaDecompressLibConstructor (
VOID
);
-VOID
-EFIAPI
-BuildGlobalVariableHob (
- IN EFI_PHYSICAL_ADDRESS GlobalVariableBase,
- IN UINT32 GlobalVariableSize
- )
-{
- ARM_HOB_GLOBAL_VARIABLE *Hob;
-
- Hob = CreateHob (EFI_HOB_TYPE_GUID_EXTENSION, sizeof (ARM_HOB_GLOBAL_VARIABLE));
- ASSERT(Hob != NULL);
-
- CopyGuid (&(Hob->Header.Name), &gArmGlobalVariableGuid);
- Hob->GlobalVariableBase = GlobalVariableBase;
- Hob->GlobalVariableSize = GlobalVariableSize;
-}
-
EFI_STATUS
GetPlatformPpi (
IN EFI_GUID *PpiGuid,
@@ -90,7 +69,6 @@ VOID
PrePiMain (
IN UINTN UefiMemoryBase,
IN UINTN StacksBase,
- IN UINTN GlobalVariableBase,
IN UINT64 StartTimeStamp
)
{
@@ -133,9 +111,6 @@ PrePiMain (
StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize);
BuildStackHob (StacksBase, StacksSize);
- // Declare the Global Variable HOB
- BuildGlobalVariableHob (GlobalVariableBase, FixedPcdGet32 (PcdPeiGlobalVariableSize));
-
//TODO: Call CpuPei as a library
BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
@@ -174,8 +149,7 @@ VOID
CEntryPoint (
IN UINTN MpId,
IN UINTN UefiMemoryBase,
- IN UINTN StacksBase,
- IN UINTN GlobalVariableBase
+ IN UINTN StacksBase
)
{
UINT64 StartTimeStamp;
@@ -199,10 +173,7 @@ CEntryPoint (
// Enable Instruction Caches on all cores.
ArmEnableInstructionCache ();
- // Define the Global Variable region
- mGlobalVariableBase = GlobalVariableBase;
-
- PrePiMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
+ PrePiMain (UefiMemoryBase, StacksBase, StartTimeStamp);
// DXE Core should always load and never return
ASSERT (FALSE);
diff --git a/ArmVirtPkg/PrePi/PrePi.h b/ArmVirtPkg/PrePi/PrePi.h
index 15b91e49c9..9b828377ad 100644
--- a/ArmVirtPkg/PrePi/PrePi.h
+++ b/ArmVirtPkg/PrePi/PrePi.h
@@ -41,7 +41,6 @@ VOID
PrePiMain (
IN UINTN UefiMemoryBase,
IN UINTN StacksBase,
- IN UINTN GlobalVariableBase,
IN UINT64 StartTimeStamp
);