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
This commit is contained in:
oliviermartin
2011-09-22 23:07:55 +00:00
parent 009f583fa0
commit c524ffbb67
7 changed files with 35 additions and 21 deletions

View File

@@ -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);
}