summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-12-14 10:22:43 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-12-14 10:22:43 +0000
commitfab5507a04b5d6f716708cb390d98e1e1a7078e8 (patch)
treecb43deceddd21bb6314dd4ec8fe0334cdfaa0c18 /ArmPlatformPkg
parente7b100fac86547d5729c14103aabec2218966062 (diff)
downloadedk2-platforms-fab5507a04b5d6f716708cb390d98e1e1a7078e8.tar.xz
ArmPlatformPkg/Sec: Fixed Monitor stack setup
Because GET_CORE_POS(MpId) returns 0x0 for the primary core, the stack position must be defined by the top of the stack. It means stack_size must be added to the stack base. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12858 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/Sec/Sec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Sec/Sec.c b/ArmPlatformPkg/Sec/Sec.c
index b32f4ffb55..a32cd3857e 100644
--- a/ArmPlatformPkg/Sec/Sec.c
+++ b/ArmPlatformPkg/Sec/Sec.c
@@ -112,7 +112,7 @@ CEntryPoint (
}
// Enter Monitor Mode
- enter_monitor_mode ((VOID*)(PcdGet32(PcdCPUCoresSecMonStackBase) + (PcdGet32(PcdCPUCoreSecMonStackSize) * GET_CORE_POS(MpId))));
+ enter_monitor_mode ((VOID*)(PcdGet32(PcdCPUCoresSecMonStackBase) + (PcdGet32(PcdCPUCoreSecMonStackSize) * (GET_CORE_POS(MpId) + 1))));
//Write the monitor mode vector table address
ArmWriteVMBar((UINT32) &monitor_vector_table);