mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
ArmPlatformPkg/Sec: Fixed Primary Non-Cold Boot Path
Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13499 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ae42bc88ee
commit
8cfd2e2457
@ -56,7 +56,7 @@ CEntryPoint (
|
|||||||
ArmPlatformSecInitialize (MpId);
|
ArmPlatformSecInitialize (MpId);
|
||||||
|
|
||||||
// Primary CPU clears out the SCU tag RAMs, secondaries wait
|
// Primary CPU clears out the SCU tag RAMs, secondaries wait
|
||||||
if (IS_PRIMARY_CORE(MpId)) {
|
if (IS_PRIMARY_CORE(MpId) && (SecBootMode == ARM_SEC_COLD_BOOT)) {
|
||||||
if (ArmIsMpCore()) {
|
if (ArmIsMpCore()) {
|
||||||
// Signal for the initial memory is configured (event: BOOT_MEM_INIT)
|
// Signal for the initial memory is configured (event: BOOT_MEM_INIT)
|
||||||
ArmCallSEV ();
|
ArmCallSEV ();
|
||||||
@ -150,17 +150,19 @@ TrustedWorldInitialization (
|
|||||||
ArmPlatformSecTrustzoneInit (MpId);
|
ArmPlatformSecTrustzoneInit (MpId);
|
||||||
|
|
||||||
// Setup the Trustzone Chipsets
|
// Setup the Trustzone Chipsets
|
||||||
if (IS_PRIMARY_CORE(MpId)) {
|
if (SecBootMode == ARM_SEC_COLD_BOOT) {
|
||||||
if (ArmIsMpCore()) {
|
if (IS_PRIMARY_CORE(MpId)) {
|
||||||
// Signal the secondary core the Security settings is done (event: EVENT_SECURE_INIT)
|
if (ArmIsMpCore()) {
|
||||||
ArmCallSEV ();
|
// Signal the secondary core the Security settings is done (event: EVENT_SECURE_INIT)
|
||||||
}
|
ArmCallSEV ();
|
||||||
} else if ((SecBootMode & ARM_SEC_BOOT_MASK) == ARM_SEC_COLD_BOOT) {
|
}
|
||||||
// The secondary cores need to wait until the Trustzone chipsets configuration is done
|
} else {
|
||||||
// before switching to Non Secure World
|
// The secondary cores need to wait until the Trustzone chipsets configuration is done
|
||||||
|
// before switching to Non Secure World
|
||||||
|
|
||||||
// Wait for the Primary Core to finish the initialization of the Secure World (event: EVENT_SECURE_INIT)
|
// Wait for the Primary Core to finish the initialization of the Secure World (event: EVENT_SECURE_INIT)
|
||||||
ArmCallWFE ();
|
ArmCallWFE ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call the Platform specific function to execute additional actions if required
|
// Call the Platform specific function to execute additional actions if required
|
||||||
|
@ -73,6 +73,10 @@ _WaitInitMem:
|
|||||||
b _SetupSecondaryCoreStack
|
b _SetupSecondaryCoreStack
|
||||||
|
|
||||||
_InitMem:
|
_InitMem:
|
||||||
|
// If we are not doing a cold boot in this case we should assume the Initial Memory to be already initialized
|
||||||
|
cmp r10, #ARM_SEC_COLD_BOOT
|
||||||
|
bne _SetupPrimaryCoreStack
|
||||||
|
|
||||||
// Initialize Init Boot Memory
|
// Initialize Init Boot Memory
|
||||||
bl ASM_PFX(ArmPlatformSecBootMemoryInit)
|
bl ASM_PFX(ArmPlatformSecBootMemoryInit)
|
||||||
|
|
||||||
|
@ -75,6 +75,10 @@ _WaitInitMem
|
|||||||
b _SetupSecondaryCoreStack
|
b _SetupSecondaryCoreStack
|
||||||
|
|
||||||
_InitMem
|
_InitMem
|
||||||
|
// If we are not doing a cold boot in this case we should assume the Initial Memory to be already initialized
|
||||||
|
cmp r10, #ARM_SEC_COLD_BOOT
|
||||||
|
bne _SetupPrimaryCoreStack
|
||||||
|
|
||||||
// Initialize Init Boot Memory
|
// Initialize Init Boot Memory
|
||||||
bl ArmPlatformSecBootMemoryInit
|
bl ArmPlatformSecBootMemoryInit
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user