ArmPlatformPkg: Changed memory model for the stacks
In the previous version, every cores had the same stack size. To avoid to waste memory with secondary core stacks, the primary core stack size is now different from the secondary cores stack size. These are the Stack PCDs and their default values: gArmPlatformTokenSpaceGuid.PcdCPUCoresSecStackBase|0 gArmPlatformTokenSpaceGuid.PcdCPUCoreSecPrimaryStackSize|0x10000 gArmPlatformTokenSpaceGuid.PcdCPUCoreSecSecondaryStackSize|0x1000 gArmPlatformTokenSpaceGuid.PcdCPUCoresSecMonStackBase|0 gArmPlatformTokenSpaceGuid.PcdCPUCoreSecMonStackSize|0x1000 gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x10000 gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x1000 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12415 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -79,7 +79,6 @@ PrePiMain (
|
||||
SaveAndSetDebugTimerInterrupt (TRUE);
|
||||
|
||||
UefiMemoryTop = UefiMemoryBase + FixedPcdGet32 (PcdSystemMemoryUefiRegionSize);
|
||||
StacksSize = PcdGet32 (PcdCPUCoresNonSecStackSize) * PcdGet32 (PcdMPCoreMaxCores);
|
||||
StacksBase = UefiMemoryTop - StacksSize;
|
||||
|
||||
// Check the PcdCPUCoresNonSecStackBase match with the calculated StackBase
|
||||
@@ -99,6 +98,7 @@ PrePiMain (
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
// Create the Stacks HOB (reserve the memory for all stacks)
|
||||
StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize) + (FixedPcdGet32(PcdClusterCount) * 4 * FixedPcdGet32(PcdCPUCoreSecondaryStackSize));
|
||||
BuildStackHob (StacksBase, StacksSize);
|
||||
|
||||
// Set the Boot Mode
|
||||
|
Reference in New Issue
Block a user