]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Sec/Sec.c
ArmPlatformPkg/Sec: Move ArmGicSetupNonSecure() prior to initialize platform-specific...
[mirror_edk2.git] / ArmPlatformPkg / Sec / Sec.c
index 97895532c54adddc746e163f5e644a3d5d368e97..6b478ac0b4324911570cb171a9c2bb8463699b5c 100644 (file)
@@ -146,6 +146,10 @@ TrustedWorldInitialization (
 
   // Setup the Trustzone Chipsets
   if (IS_PRIMARY_CORE(MpId)) {
+    // Transfer the interrupt to Non-secure World
+    ArmGicSetupNonSecure (PcdGet32(PcdGicDistributorBase), PcdGet32(PcdGicInterruptInterfaceBase));
+
+    // Initialize platform specific security policy
     ArmPlatformTrustzoneInit ();
 
     if (ArmIsMpCore()) {
@@ -160,9 +164,6 @@ TrustedWorldInitialization (
     ArmCpuSynchronizeWait (ARM_CPU_EVENT_SECURE_INIT);
   }
 
-  // Transfer the interrupt to Non-secure World
-  ArmGicSetupNonSecure (PcdGet32(PcdGicDistributorBase), PcdGet32(PcdGicInterruptInterfaceBase));
-
   // Call the Platform specific fucntion to execute additional actions if required
   JumpAddress = PcdGet32 (PcdFvBaseAddress);
   ArmPlatformSecExtraAction (MpId, &JumpAddress);