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
This commit is contained in:
committed by
abiesheuvel
parent
5eeba3b7f1
commit
f2e17a0731
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user