From fab5507a04b5d6f716708cb390d98e1e1a7078e8 Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Wed, 14 Dec 2011 10:22:43 +0000 Subject: [PATCH] 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 --- ArmPlatformPkg/Sec/Sec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.2