summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/PrePi/PrePi.c
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-22 23:07:55 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-22 23:07:55 +0000
commitc524ffbb6762dd7b98108638caa4a25eaf7fcf6b (patch)
treec123ebdb7c4d168677fc85c04981ab85250e2c36 /ArmPlatformPkg/PrePi/PrePi.c
parent009f583fa00404ea243cc5b75f1a4ea4f6bc0c18 (diff)
downloadedk2-c524ffbb6762dd7b98108638caa4a25eaf7fcf6b.tar.gz
edk2-c524ffbb6762dd7b98108638caa4a25eaf7fcf6b.tar.bz2
edk2-c524ffbb6762dd7b98108638caa4a25eaf7fcf6b.zip
ArmPlatformPkg/PrePi: Removed the dependency on 'PcdCPUCoresNonSecStackBase'
In PrePi the StackBase is automatically calculated from the top of the memory. The information is now passed from the assembly files to the C code. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12418 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/PrePi/PrePi.c')
-rwxr-xr-xArmPlatformPkg/PrePi/PrePi.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c
index 64c371c803..2ca9c3b8fd 100755
--- a/ArmPlatformPkg/PrePi/PrePi.c
+++ b/ArmPlatformPkg/PrePi/PrePi.c
@@ -51,6 +51,8 @@ LzmaDecompressLibConstructor (
VOID
PrePiMain (
IN UINTN UefiMemoryBase,
+ IN UINTN StacksBase,
+ IN UINTN GlobalVariableBase,
IN UINT64 StartTimeStamp
)
{
@@ -58,9 +60,7 @@ PrePiMain (
EFI_STATUS Status;
CHAR8 Buffer[100];
UINTN CharCount;
- UINTN UefiMemoryTop;
UINTN StacksSize;
- UINTN StacksBase;
// Enable program flow prediction, if supported.
ArmEnableBranchPrediction ();
@@ -77,12 +77,6 @@ PrePiMain (
// Initialize the Debug Agent for Source Level Debugging
InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL);
SaveAndSetDebugTimerInterrupt (TRUE);
-
- UefiMemoryTop = UefiMemoryBase + FixedPcdGet32 (PcdSystemMemoryUefiRegionSize);
- StacksBase = UefiMemoryTop - StacksSize;
-
- // Check the PcdCPUCoresNonSecStackBase match with the calculated StackBase
- ASSERT (StacksBase == PcdGet32 (PcdCPUCoresNonSecStackBase));
// Declare the PI/UEFI memory region
HobList = HobConstructor (
@@ -137,7 +131,9 @@ PrePiMain (
VOID
CEntryPoint (
IN UINTN MpId,
- IN UINTN UefiMemoryBase
+ IN UINTN UefiMemoryBase,
+ IN UINTN StacksBase,
+ IN UINTN GlobalVariableBase
)
{
UINT64 StartTimeStamp;
@@ -170,7 +166,7 @@ CEntryPoint (
// If not primary Jump to Secondary Main
if (IS_PRIMARY_CORE(MpId)) {
// Goto primary Main.
- PrimaryMain (UefiMemoryBase, StartTimeStamp);
+ PrimaryMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
} else {
SecondaryMain (MpId);
}