mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
1856157a55
commit
5eeba3b7f1
|
@ -158,16 +158,10 @@ _GetStackBase:
|
||||||
cmp x0, #1
|
cmp x0, #1
|
||||||
bne _PrepareArguments
|
bne _PrepareArguments
|
||||||
|
|
||||||
_ReserveGlobalVariable:
|
|
||||||
LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), x0)
|
|
||||||
// InitializePrimaryStack($GlobalVariableSize, $Tmp1, $Tmp2)
|
|
||||||
InitializePrimaryStack(x0, x1, x2)
|
|
||||||
|
|
||||||
_PrepareArguments:
|
_PrepareArguments:
|
||||||
mov x0, x10
|
mov x0, x10
|
||||||
mov x1, x11
|
mov x1, x11
|
||||||
mov x2, x12
|
mov x2, x12
|
||||||
mov x3, sp
|
|
||||||
|
|
||||||
// Move sec startup address into a data register
|
// Move sec startup address into a data register
|
||||||
// Ensure we're jumping to FV version of the code (not boot remapped alias)
|
// Ensure we're jumping to FV version of the code (not boot remapped alias)
|
||||||
|
@ -177,7 +171,6 @@ _PrepareArguments:
|
||||||
// x0 = MpId
|
// x0 = MpId
|
||||||
// x1 = UefiMemoryBase
|
// x1 = UefiMemoryBase
|
||||||
// x2 = StacksBase
|
// x2 = StacksBase
|
||||||
// x3 = GlobalVariableBase
|
|
||||||
blr x4
|
blr x4
|
||||||
|
|
||||||
_NeverReturn:
|
_NeverReturn:
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
gArmMpCoreInfoPpiGuid
|
gArmMpCoreInfoPpiGuid
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gArmGlobalVariableGuid
|
|
||||||
gArmMpCoreInfoGuid
|
gArmMpCoreInfoGuid
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
|
@ -79,8 +78,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
||||||
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
||||||
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize
|
|
||||||
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
|
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
|
||||||
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdCoreCount
|
gArmPlatformTokenSpaceGuid.PcdCoreCount
|
||||||
|
|
|
@ -25,14 +25,10 @@
|
||||||
#include <Ppi/GuidedSectionExtraction.h>
|
#include <Ppi/GuidedSectionExtraction.h>
|
||||||
#include <Ppi/ArmMpCoreInfo.h>
|
#include <Ppi/ArmMpCoreInfo.h>
|
||||||
#include <Guid/LzmaDecompress.h>
|
#include <Guid/LzmaDecompress.h>
|
||||||
#include <Guid/ArmGlobalVariableHob.h>
|
|
||||||
|
|
||||||
#include "PrePi.h"
|
#include "PrePi.h"
|
||||||
#include "LzmaDecompress.h"
|
#include "LzmaDecompress.h"
|
||||||
|
|
||||||
// Not used when PrePi in run in XIP mode
|
|
||||||
UINTN mGlobalVariableBase = 0;
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ExtractGuidedSectionLibConstructor (
|
ExtractGuidedSectionLibConstructor (
|
||||||
|
@ -45,23 +41,6 @@ LzmaDecompressLibConstructor (
|
||||||
VOID
|
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
|
EFI_STATUS
|
||||||
GetPlatformPpi (
|
GetPlatformPpi (
|
||||||
IN EFI_GUID *PpiGuid,
|
IN EFI_GUID *PpiGuid,
|
||||||
|
@ -90,7 +69,6 @@ VOID
|
||||||
PrePiMain (
|
PrePiMain (
|
||||||
IN UINTN UefiMemoryBase,
|
IN UINTN UefiMemoryBase,
|
||||||
IN UINTN StacksBase,
|
IN UINTN StacksBase,
|
||||||
IN UINTN GlobalVariableBase,
|
|
||||||
IN UINT64 StartTimeStamp
|
IN UINT64 StartTimeStamp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -133,9 +111,6 @@ PrePiMain (
|
||||||
StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize);
|
StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize);
|
||||||
BuildStackHob (StacksBase, StacksSize);
|
BuildStackHob (StacksBase, StacksSize);
|
||||||
|
|
||||||
// Declare the Global Variable HOB
|
|
||||||
BuildGlobalVariableHob (GlobalVariableBase, FixedPcdGet32 (PcdPeiGlobalVariableSize));
|
|
||||||
|
|
||||||
//TODO: Call CpuPei as a library
|
//TODO: Call CpuPei as a library
|
||||||
BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
|
BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
|
||||||
|
|
||||||
|
@ -174,8 +149,7 @@ VOID
|
||||||
CEntryPoint (
|
CEntryPoint (
|
||||||
IN UINTN MpId,
|
IN UINTN MpId,
|
||||||
IN UINTN UefiMemoryBase,
|
IN UINTN UefiMemoryBase,
|
||||||
IN UINTN StacksBase,
|
IN UINTN StacksBase
|
||||||
IN UINTN GlobalVariableBase
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT64 StartTimeStamp;
|
UINT64 StartTimeStamp;
|
||||||
|
@ -199,10 +173,7 @@ CEntryPoint (
|
||||||
// Enable Instruction Caches on all cores.
|
// Enable Instruction Caches on all cores.
|
||||||
ArmEnableInstructionCache ();
|
ArmEnableInstructionCache ();
|
||||||
|
|
||||||
// Define the Global Variable region
|
PrePiMain (UefiMemoryBase, StacksBase, StartTimeStamp);
|
||||||
mGlobalVariableBase = GlobalVariableBase;
|
|
||||||
|
|
||||||
PrePiMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
|
|
||||||
|
|
||||||
// DXE Core should always load and never return
|
// DXE Core should always load and never return
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
|
|
|
@ -41,7 +41,6 @@ VOID
|
||||||
PrePiMain (
|
PrePiMain (
|
||||||
IN UINTN UefiMemoryBase,
|
IN UINTN UefiMemoryBase,
|
||||||
IN UINTN StacksBase,
|
IN UINTN StacksBase,
|
||||||
IN UINTN GlobalVariableBase,
|
|
||||||
IN UINT64 StartTimeStamp
|
IN UINT64 StartTimeStamp
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue