]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/PrePi.c
ArmPlatformPkg: Changed memory model for the stacks
[mirror_edk2.git] / ArmPlatformPkg / PrePi / PrePi.c
index a0198d89b80c2acf648407af1ac29028db28109f..64c371c8037d12641cdb6aac3f3df260c3370653 100755 (executable)
@@ -79,7 +79,6 @@ PrePiMain (
   SaveAndSetDebugTimerInterrupt (TRUE);\r
 \r
   UefiMemoryTop = UefiMemoryBase + FixedPcdGet32 (PcdSystemMemoryUefiRegionSize);\r
-  StacksSize = PcdGet32 (PcdCPUCoresNonSecStackSize) * PcdGet32 (PcdMPCoreMaxCores);\r
   StacksBase = UefiMemoryTop - StacksSize;\r
 \r
   // Check the PcdCPUCoresNonSecStackBase match with the calculated StackBase\r
@@ -99,6 +98,7 @@ PrePiMain (
   ASSERT_EFI_ERROR (Status);\r
 \r
   // Create the Stacks HOB (reserve the memory for all stacks)\r
+  StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize) + (FixedPcdGet32(PcdClusterCount) * 4 * FixedPcdGet32(PcdCPUCoreSecondaryStackSize));\r
   BuildStackHob (StacksBase, StacksSize);\r
 \r
   // Set the Boot Mode\r