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:
@@ -33,13 +33,16 @@
|
||||
|
||||
StartupAddr DCD CEntryPoint
|
||||
|
||||
_ModuleEntryPoint
|
||||
_ModuleEntryPoint FUNCTION
|
||||
// First ensure all interrupts are disabled
|
||||
blx ArmDisableInterrupts
|
||||
|
||||
// Ensure that the MMU and caches are off
|
||||
blx ArmDisableCachesAndMmu
|
||||
|
||||
// By default, we are doing a cold boot
|
||||
mov r10, #ARM_SEC_COLD_BOOT
|
||||
|
||||
// Jump to Platform Specific Boot Action function
|
||||
blx ArmPlatformSecBootAction
|
||||
|
||||
@@ -61,6 +64,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 ArmCallWFE
|
||||
// Now the Init Mem is initialized, we setup the secondary core stacks
|
||||
@@ -110,8 +118,11 @@ _PrepareArguments
|
||||
|
||||
// Jump to SEC C code
|
||||
// r0 = mp_id
|
||||
// r1 = Boot Mode
|
||||
mov r0, r5
|
||||
mov r1, r10
|
||||
blx r3
|
||||
ENDFUNC
|
||||
|
||||
_NeverReturn
|
||||
b _NeverReturn
|
||||
|
Reference in New Issue
Block a user