diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-04-03 20:05:30 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-04-03 20:05:30 +0000 |
commit | 81514a8ad0a0456503663522536fec9395760311 (patch) | |
tree | 59aa079fc835df7a06fc6354b501d2dcc4add562 /ArmPlatformPkg/PrePi/PeiMPCore.inf | |
parent | cddd490b2345e1aad85859eb84c0ee18c7ee8fce (diff) | |
download | edk2-81514a8ad0a0456503663522536fec9395760311.tar.gz edk2-81514a8ad0a0456503663522536fec9395760311.tar.bz2 edk2-81514a8ad0a0456503663522536fec9395760311.zip |
ArmPlatformPkg/PrePi: Use the same calculation to declare the stack size as in the entrypoint
The stack size in the entrypoint (ie: $ARCH/ModuleEntryPoint.S) is calculated such as
StackSize = PrimaryCoreStack + (core_count - 1) * SecondaryCoreStack
While we were declaring the stacksize into the stack hob as:
StackSize = PrimaryCoreStack + (cluster * 8) * SecondaryCoreStack
If the number of cluster (ie: PcdClusterCount) were not defined correctly then
the stack size declaration were not correct.
It could cause stack corruption if the allocator allocates memory in this range.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15431 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/PrePi/PeiMPCore.inf')
-rwxr-xr-x | ArmPlatformPkg/PrePi/PeiMPCore.inf | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf index 276a37226d..45c00b8df0 100755 --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf @@ -1,6 +1,6 @@ #/** @file
#
-# Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
+# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -98,7 +98,6 @@ gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
gArmPlatformTokenSpaceGuid.PcdCoreCount
- gArmPlatformTokenSpaceGuid.PcdClusterCount
gArmTokenSpaceGuid.PcdArmPrimaryCore
gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
|