diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-11-27 17:07:06 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-11-27 17:07:06 +0000 |
commit | f2e17a0731d96222ae049987ab75485b3e73aa84 (patch) | |
tree | 05be5d80d702052da82549eff101277b5ca822fd /ArmPlatformPkg | |
parent | 5eeba3b7f1dd70113d8dba9292bb85b341742edf (diff) | |
download | edk2-f2e17a0731d96222ae049987ab75485b3e73aa84.tar.gz edk2-f2e17a0731d96222ae049987ab75485b3e73aa84.tar.bz2 edk2-f2e17a0731d96222ae049987ab75485b3e73aa84.zip |
ArmPlatformPkg/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>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18992 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r-- | ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S | 7 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S | 6 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm | 7 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePi/MainMPCore.c | 3 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePi/MainUniCore.c | 3 | ||||
-rwxr-xr-x | ArmPlatformPkg/PrePi/PeiMPCore.inf | 3 | ||||
-rwxr-xr-x | ArmPlatformPkg/PrePi/PeiUniCore.inf | 3 | ||||
-rwxr-xr-x | ArmPlatformPkg/PrePi/PrePi.c | 31 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePi/PrePi.h | 2 |
9 files changed, 4 insertions, 61 deletions
diff --git a/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S index 0d0e3e17c1..f63fd44067 100644 --- a/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S +++ b/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S @@ -133,16 +133,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)
@@ -152,7 +146,6 @@ _PrepareArguments: // x0 = MpId
// x1 = UefiMemoryBase
// x2 = StacksBase
- // x3 = GlobalVariableBase
blr x4
_NeverReturn:
diff --git a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S index f64934480f..1311efc5cb 100644 --- a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S +++ b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S @@ -141,11 +141,6 @@ _GetStackBase: cmp r0, #1
bne _PrepareArguments
-_ReserveGlobalVariable:
- LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), r0)
- // InitializePrimaryStack($GlobalVariableSize, $Tmp1)
- InitializePrimaryStack(r0, r1)
-
_PrepareArguments:
mov r0, r8
mov r1, r9
@@ -160,7 +155,6 @@ _PrepareArguments: // r0 = MpId
// r1 = UefiMemoryBase
// r2 = StacksBase
- // r3 = GlobalVariableBase
blx r4
_NeverReturn:
diff --git a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm index f73c56850d..a20e3fde0b 100644 --- a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm +++ b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm @@ -143,16 +143,10 @@ _GetStackBase cmp r0, #1
bne _PrepareArguments
-_ReserveGlobalVariable
- LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), r0)
- // InitializePrimaryStack($GlobalVariableSize, $Tmp1)
- InitializePrimaryStack r0, r1
-
_PrepareArguments
mov r0, r8
mov r1, r9
mov r2, r10
- mov r3, sp
// Move sec startup address into a data register
// Ensure we're jumping to FV version of the code (not boot remapped alias)
@@ -162,7 +156,6 @@ _PrepareArguments // r0 = MpId
// r1 = UefiMemoryBase
// r2 = StacksBase
- // r3 = GlobalVariableBase
blx r4
_NeverReturn
diff --git a/ArmPlatformPkg/PrePi/MainMPCore.c b/ArmPlatformPkg/PrePi/MainMPCore.c index bf813730d3..603f4bb8be 100644 --- a/ArmPlatformPkg/PrePi/MainMPCore.c +++ b/ArmPlatformPkg/PrePi/MainMPCore.c @@ -22,7 +22,6 @@ VOID PrimaryMain (
IN UINTN UefiMemoryBase,
IN UINTN StacksBase,
- IN UINTN GlobalVariableBase,
IN UINT64 StartTimeStamp
)
{
@@ -35,7 +34,7 @@ PrimaryMain ( ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E, PcdGet32 (PcdGicSgiIntId));
}
- PrePiMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
+ PrePiMain (UefiMemoryBase, StacksBase, StartTimeStamp);
// We must never return
ASSERT(FALSE);
diff --git a/ArmPlatformPkg/PrePi/MainUniCore.c b/ArmPlatformPkg/PrePi/MainUniCore.c index 43588a50dd..49b02338eb 100644 --- a/ArmPlatformPkg/PrePi/MainUniCore.c +++ b/ArmPlatformPkg/PrePi/MainUniCore.c @@ -18,7 +18,6 @@ VOID PrimaryMain (
IN UINTN UefiMemoryBase,
IN UINTN StacksBase,
- IN UINTN GlobalVariableBase,
IN UINT64 StartTimeStamp
)
{
@@ -27,7 +26,7 @@ PrimaryMain ( ASSERT(ArmIsMpCore() == 0);
DEBUG_CODE_END();
- PrePiMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
+ PrePiMain (UefiMemoryBase, StacksBase, StartTimeStamp);
// We must never return
ASSERT(FALSE);
diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf index ac1f8d0391..4ce4a52784 100755 --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf @@ -67,7 +67,6 @@ gArmMpCoreInfoPpiGuid
[Guids]
- gArmGlobalVariableGuid
gArmMpCoreInfoGuid
[FeaturePcd]
@@ -89,8 +88,6 @@ gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
- gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize
-
gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdGicSgiIntId
diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/PeiUniCore.inf index c5663901c9..85114af7d1 100755 --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf @@ -66,7 +66,6 @@ gArmMpCoreInfoPpiGuid
[Guids]
- gArmGlobalVariableGuid
gArmMpCoreInfoGuid
[FeaturePcd]
@@ -88,8 +87,6 @@ gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
- gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize
-
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
gArmPlatformTokenSpaceGuid.PcdCoreCount
diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c index 99afe6fa90..b563b5ee3a 100755 --- a/ArmPlatformPkg/PrePi/PrePi.c +++ b/ArmPlatformPkg/PrePi/PrePi.c @@ -25,7 +25,6 @@ #include <Ppi/GuidedSectionExtraction.h>
#include <Ppi/ArmMpCoreInfo.h>
#include <Guid/LzmaDecompress.h>
-#include <Guid/ArmGlobalVariableHob.h>
#include "PrePi.h"
#include "LzmaDecompress.h"
@@ -33,9 +32,6 @@ #define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > mSystemMemoryEnd) || \
((FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))
-// Not used when PrePi in run in XIP mode
-UINTN mGlobalVariableBase = 0;
-
EFI_STATUS
EFIAPI
ExtractGuidedSectionLibConstructor (
@@ -48,23 +44,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,
@@ -93,7 +72,6 @@ VOID PrePiMain (
IN UINTN UefiMemoryBase,
IN UINTN StacksBase,
- IN UINTN GlobalVariableBase,
IN UINT64 StartTimeStamp
)
{
@@ -146,9 +124,6 @@ PrePiMain ( }
BuildStackHob (StacksBase, StacksSize);
- // Declare the Global Variable HOB
- BuildGlobalVariableHob (GlobalVariableBase, FixedPcdGet32 (PcdPeiGlobalVariableSize));
-
//TODO: Call CpuPei as a library
BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
@@ -203,8 +178,7 @@ VOID CEntryPoint (
IN UINTN MpId,
IN UINTN UefiMemoryBase,
- IN UINTN StacksBase,
- IN UINTN GlobalVariableBase
+ IN UINTN StacksBase
)
{
UINT64 StartTimeStamp;
@@ -235,7 +209,6 @@ CEntryPoint ( // Define the Global Variable region when we are not running in XIP
if (!IS_XIP()) {
if (ArmPlatformIsPrimaryCore (MpId)) {
- mGlobalVariableBase = GlobalVariableBase;
if (ArmIsMpCore()) {
// Signal the Global Variable Region is defined (event: ARM_CPU_EVENT_DEFAULT)
ArmCallSEV ();
@@ -249,7 +222,7 @@ CEntryPoint ( // If not primary Jump to Secondary Main
if (ArmPlatformIsPrimaryCore (MpId)) {
// Goto primary Main.
- PrimaryMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
+ PrimaryMain (UefiMemoryBase, StacksBase, StartTimeStamp);
} else {
SecondaryMain (MpId);
}
diff --git a/ArmPlatformPkg/PrePi/PrePi.h b/ArmPlatformPkg/PrePi/PrePi.h index 6e90c2afc8..e7f58e5924 100644 --- a/ArmPlatformPkg/PrePi/PrePi.h +++ b/ArmPlatformPkg/PrePi/PrePi.h @@ -41,7 +41,6 @@ VOID PrePiMain (
IN UINTN UefiMemoryBase,
IN UINTN StacksBase,
- IN UINTN GlobalVariableBase,
IN UINT64 StartTimeStamp
);
@@ -62,7 +61,6 @@ VOID PrimaryMain (
IN UINTN UefiMemoryBase,
IN UINTN StacksBase,
- IN UINTN GlobalVariableBase,
IN UINT64 StartTimeStamp
);
|