ArmPlatformPkg/Sec: Added support for Non Cold Boot Paths

For instance, in case of CpuHotPlug boot path the platform has already been
initialized. The CPU core should not execute any of the platform initialization
in this case.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13492 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin
2012-07-04 20:08:54 +00:00
parent 77734e3d69
commit a75568e9c9
7 changed files with 58 additions and 22 deletions

View File

@@ -26,7 +26,8 @@
VOID
CEntryPoint (
IN UINTN MpId
IN UINTN MpId,
IN UINTN SecBootMode
)
{
CHAR8 Buffer[100];
@@ -109,7 +110,7 @@ CEntryPoint (
((PcdGet32(PcdCPUCoresSecMonStackBase) != 0) && (PcdGet32(PcdCPUCoreSecMonStackSize) != 0)));
// Enter Monitor Mode
enter_monitor_mode ((UINTN)TrustedWorldInitialization, MpId, (VOID*)(PcdGet32(PcdCPUCoresSecMonStackBase) + (PcdGet32(PcdCPUCoreSecMonStackSize) * (GET_CORE_POS(MpId) + 1))));
enter_monitor_mode ((UINTN)TrustedWorldInitialization, MpId, SecBootMode, (VOID*)(PcdGet32(PcdCPUCoresSecMonStackBase) + (PcdGet32(PcdCPUCoreSecMonStackSize) * (GET_CORE_POS(MpId) + 1))));
} else {
if (IS_PRIMARY_CORE(MpId)) {
SerialPrint ("Trust Zone Configuration is disabled\n\r");
@@ -131,7 +132,8 @@ CEntryPoint (
VOID
TrustedWorldInitialization (
IN UINTN MpId
IN UINTN MpId,
IN UINTN SecBootMode
)
{
UINTN JumpAddress;
@@ -153,7 +155,7 @@ TrustedWorldInitialization (
// Signal the secondary core the Security settings is done (event: EVENT_SECURE_INIT)
ArmCallSEV ();
}
} else {
} else if ((SecBootMode & ARM_SEC_BOOT_MASK) == ARM_SEC_COLD_BOOT) {
// The secondary cores need to wait until the Trustzone chipsets configuration is done
// before switching to Non Secure World