]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Sec/Sec.c
ArmPlatformPkg/Sec: Added support for Non Cold Boot Paths
[mirror_edk2.git] / ArmPlatformPkg / Sec / Sec.c
index f9746ad89161d20f12d65ba3f9486e1c284ac207..6734653c3e0e98d21c9c5ee8a9ce804e4bb8d99b 100644 (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