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
This commit is contained in:
oliviermartin 2011-12-14 10:22:43 +00:00
parent e7b100fac8
commit fab5507a04
1 changed files with 1 additions and 1 deletions

View File

@ -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);