mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/PrePeiCore: 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 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
This commit is contained in:
parent
6ef6afac50
commit
3707dee3da
|
@ -101,10 +101,5 @@ _PrepareArguments:
|
||||||
blr x3
|
blr x3
|
||||||
|
|
||||||
_SetupPrimaryCoreStack:
|
_SetupPrimaryCoreStack:
|
||||||
// x1 contains the top of the primary stack
|
mov sp, x1
|
||||||
LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), x2)
|
|
||||||
|
|
||||||
// The reserved space for global variable must be 16-bytes aligned for pushing
|
|
||||||
// 128-bit variable on the stack
|
|
||||||
SetPrimaryStack (x1, x2, x3, x4)
|
|
||||||
b _PrepareArguments
|
b _PrepareArguments
|
||||||
|
|
|
@ -82,12 +82,7 @@ _PrepareArguments:
|
||||||
blx r3
|
blx r3
|
||||||
|
|
||||||
_SetupPrimaryCoreStack:
|
_SetupPrimaryCoreStack:
|
||||||
// r1 contains the top of the primary stack
|
mov sp, r1
|
||||||
LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), r2)
|
|
||||||
|
|
||||||
// The reserved space for global variable must be 8-bytes aligned for pushing
|
|
||||||
// 64-bit variable on the stack
|
|
||||||
SetPrimaryStack (r1, r2, r3)
|
|
||||||
b _PrepareArguments
|
b _PrepareArguments
|
||||||
|
|
||||||
_NeverReturn:
|
_NeverReturn:
|
||||||
|
|
|
@ -84,12 +84,7 @@ _PrepareArguments
|
||||||
blx r3
|
blx r3
|
||||||
|
|
||||||
_SetupPrimaryCoreStack
|
_SetupPrimaryCoreStack
|
||||||
// r1 contains the top of the primary stack
|
mov sp, r1
|
||||||
LoadConstantToReg (FixedPcdGet32(PcdPeiGlobalVariableSize), r2)
|
|
||||||
|
|
||||||
// The reserved space for global variable must be 8-bytes aligned for pushing
|
|
||||||
// 64-bit variable on the stack
|
|
||||||
SetPrimaryStack (r1, r2, r3)
|
|
||||||
b _PrepareArguments
|
b _PrepareArguments
|
||||||
|
|
||||||
_NeverReturn
|
_NeverReturn
|
||||||
|
|
|
@ -17,23 +17,15 @@
|
||||||
#include <Library/DebugAgentLib.h>
|
#include <Library/DebugAgentLib.h>
|
||||||
#include <Library/ArmLib.h>
|
#include <Library/ArmLib.h>
|
||||||
|
|
||||||
#include <Ppi/ArmGlobalVariable.h>
|
|
||||||
|
|
||||||
#include "PrePeiCore.h"
|
#include "PrePeiCore.h"
|
||||||
|
|
||||||
CONST EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mTemporaryRamSupportPpi = { PrePeiCoreTemporaryRamSupport };
|
CONST EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mTemporaryRamSupportPpi = { PrePeiCoreTemporaryRamSupport };
|
||||||
CONST ARM_GLOBAL_VARIABLE_PPI mGlobalVariablePpi = { PrePeiCoreGetGlobalVariableMemory };
|
|
||||||
|
|
||||||
CONST EFI_PEI_PPI_DESCRIPTOR gCommonPpiTable[] = {
|
CONST EFI_PEI_PPI_DESCRIPTOR gCommonPpiTable[] = {
|
||||||
{
|
{
|
||||||
EFI_PEI_PPI_DESCRIPTOR_PPI,
|
EFI_PEI_PPI_DESCRIPTOR_PPI,
|
||||||
&gEfiTemporaryRamSupportPpiGuid,
|
&gEfiTemporaryRamSupportPpiGuid,
|
||||||
(VOID *) &mTemporaryRamSupportPpi
|
(VOID *) &mTemporaryRamSupportPpi
|
||||||
},
|
|
||||||
{
|
|
||||||
EFI_PEI_PPI_DESCRIPTOR_PPI,
|
|
||||||
&gArmGlobalVariablePpiGuid,
|
|
||||||
(VOID *) &mGlobalVariablePpi
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -146,18 +138,3 @@ PrePeiCoreTemporaryRamSupport (
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
PrePeiCoreGetGlobalVariableMemory (
|
|
||||||
OUT EFI_PHYSICAL_ADDRESS *GlobalVariableBase
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ASSERT (GlobalVariableBase != NULL);
|
|
||||||
|
|
||||||
*GlobalVariableBase = (UINTN)PcdGet64 (PcdCPUCoresStackBase) +
|
|
||||||
(UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) -
|
|
||||||
(UINTN)PcdGet32 (PcdPeiGlobalVariableSize);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,6 @@ PrePeiCoreTemporaryRamSupport (
|
||||||
IN UINTN CopySize
|
IN UINTN CopySize
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
PrePeiCoreGetGlobalVariableMemory (
|
|
||||||
OUT EFI_PHYSICAL_ADDRESS *GlobalVariableBase
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
SecSwitchStack (
|
SecSwitchStack (
|
||||||
INTN StackDelta
|
INTN StackDelta
|
||||||
|
|
|
@ -59,7 +59,6 @@
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiTemporaryRamSupportPpiGuid
|
gEfiTemporaryRamSupportPpiGuid
|
||||||
gArmGlobalVariablePpiGuid
|
|
||||||
gArmMpCoreInfoPpiGuid
|
gArmMpCoreInfoPpiGuid
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
|
@ -73,8 +72,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
||||||
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
||||||
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize
|
|
||||||
|
|
||||||
gArmTokenSpaceGuid.PcdGicDistributorBase
|
gArmTokenSpaceGuid.PcdGicDistributorBase
|
||||||
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
|
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
|
||||||
gArmTokenSpaceGuid.PcdGicSgiIntId
|
gArmTokenSpaceGuid.PcdGicSgiIntId
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiTemporaryRamSupportPpiGuid
|
gEfiTemporaryRamSupportPpiGuid
|
||||||
gArmGlobalVariablePpiGuid
|
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
||||||
|
@ -70,5 +69,3 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase
|
gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase
|
||||||
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
||||||
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
||||||
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize
|
|
||||||
|
|
Loading…
Reference in New Issue