]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Sec/SecEntryPoint.S
ArmPlatformPkg/ArmPlatformLib: Introduce ArmPlatformSecBootAction function
[mirror_edk2.git] / ArmPlatformPkg / Sec / SecEntryPoint.S
index 909f7fafbc3d3a5dd55c514751c105df06b3bc0e..f8599393cbc1249fe5e58dde40f5554f35d2171c 100644 (file)
@@ -30,6 +30,7 @@ GCC_ASM_EXPORT(_ModuleEntryPoint)
 \r
 #global functions referenced by this module\r
 GCC_ASM_IMPORT(CEntryPoint)\r
+GCC_ASM_IMPORT(ArmPlatformSecBootAction)\r
 GCC_ASM_IMPORT(ArmPlatformIsMemoryInitialized)\r
 GCC_ASM_IMPORT(ArmPlatformInitializeBootMemory)\r
 GCC_ASM_IMPORT(ArmDisableInterrupts)\r
@@ -46,16 +47,19 @@ StartupAddr:        .word   ASM_PFX(CEntryPoint)
 SecVectorTableAddr: .word              ASM_PFX(SecVectorTable)\r
 \r
 ASM_PFX(_ModuleEntryPoint):\r
- #Set VBAR to the start of the exception vectors in Secure Mode\r
-  ldr   r0, SecVectorTableAddr\r
-  bl   ASM_PFX(ArmWriteVBar)\r
-\r
   # First ensure all interrupts are disabled\r
   bl   ASM_PFX(ArmDisableInterrupts)\r
 \r
   # Ensure that the MMU and caches are off\r
   bl  ASM_PFX(ArmDisableCachesAndMmu)\r
 \r
+  # Jump to Platform Specific Boot Action function\r
+  blx   ASM_PFX(ArmPlatformSecBootAction)\r
+\r
+  # Set VBAR to the start of the exception vectors in Secure Mode\r
+  ldr   r0, =SecVectorTable\r
+  bl    ASM_PFX(ArmWriteVBar)\r
+\r
 _IdentifyCpu: \r
   # Identify CPU ID\r
   bl    ASM_PFX(ArmReadMpidr)\r