summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Sec/SecEntryPoint.S
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-04 20:08:54 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-04 20:08:54 +0000
commita75568e9c96cc17b1e802bb43f97c26af0e6f77b (patch)
tree310c66aa9e5527b78012d70cfaf81ee176eb8e7e /ArmPlatformPkg/Sec/SecEntryPoint.S
parent77734e3d69e98160d441ee2e56cca07390d2bc59 (diff)
downloadedk2-platforms-a75568e9c96cc17b1e802bb43f97c26af0e6f77b.tar.xz
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
Diffstat (limited to 'ArmPlatformPkg/Sec/SecEntryPoint.S')
-rw-r--r--ArmPlatformPkg/Sec/SecEntryPoint.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Sec/SecEntryPoint.S b/ArmPlatformPkg/Sec/SecEntryPoint.S
index 8266dad977..ed7448af21 100644
--- a/ArmPlatformPkg/Sec/SecEntryPoint.S
+++ b/ArmPlatformPkg/Sec/SecEntryPoint.S
@@ -38,6 +38,9 @@ ASM_PFX(_ModuleEntryPoint):
// Ensure that the MMU and caches are off
bl ASM_PFX(ArmDisableCachesAndMmu)
+ // By default, we are doing a cold boot
+ mov r10, #ARM_SEC_COLD_BOOT
+
// Jump to Platform Specific Boot Action function
blx ASM_PFX(ArmPlatformSecBootAction)
@@ -59,6 +62,11 @@ _IdentifyCpu:
beq _InitMem
_WaitInitMem:
+ // If we are not doing a cold boot in this case we should assume the Initial Memory to be already initialized
+ // Otherwise we have to wait the Primary Core to finish the initialization
+ cmp r10, #ARM_SEC_COLD_BOOT
+ bne _SetupSecondaryCoreStack
+
// Wait for the primary core to initialize the initial memory (event: BOOT_MEM_INIT)
bl ASM_PFX(ArmCallWFE)
// Now the Init Mem is initialized, we setup the secondary core stacks
@@ -108,7 +116,9 @@ _PrepareArguments:
// Jump to SEC C code
// r0 = mp_id
+ // r1 = Boot Mode
mov r0, r5
+ mov r1, r10
blx r3
_NeverReturn: