summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Sec/Sec.c
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/Sec.c
parent77734e3d69e98160d441ee2e56cca07390d2bc59 (diff)
downloadedk2-a75568e9c96cc17b1e802bb43f97c26af0e6f77b.tar.gz
edk2-a75568e9c96cc17b1e802bb43f97c26af0e6f77b.tar.bz2
edk2-a75568e9c96cc17b1e802bb43f97c26af0e6f77b.zip
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/Sec.c')
-rw-r--r--ArmPlatformPkg/Sec/Sec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ArmPlatformPkg/Sec/Sec.c b/ArmPlatformPkg/Sec/Sec.c
index f9746ad891..6734653c3e 100644
--- a/ArmPlatformPkg/Sec/Sec.c
+++ b/ArmPlatformPkg/Sec/Sec.c
@@ -26,7 +26,8 @@
VOID
CEntryPoint (
- IN UINTN MpId
+ IN UINTN MpId,
+ IN UINTN SecBootMode
)
{
CHAR8 Buffer[100];
@@ -109,7 +110,7 @@ CEntryPoint (
((PcdGet32(PcdCPUCoresSecMonStackBase) != 0) && (PcdGet32(PcdCPUCoreSecMonStackSize) != 0)));
// Enter Monitor Mode
- enter_monitor_mode ((UINTN)TrustedWorldInitialization, MpId, (VOID*)(PcdGet32(PcdCPUCoresSecMonStackBase) + (PcdGet32(PcdCPUCoreSecMonStackSize) * (GET_CORE_POS(MpId) + 1))));
+ enter_monitor_mode ((UINTN)TrustedWorldInitialization, MpId, SecBootMode, (VOID*)(PcdGet32(PcdCPUCoresSecMonStackBase) + (PcdGet32(PcdCPUCoreSecMonStackSize) * (GET_CORE_POS(MpId) + 1))));
} else {
if (IS_PRIMARY_CORE(MpId)) {
SerialPrint ("Trust Zone Configuration is disabled\n\r");
@@ -131,7 +132,8 @@ CEntryPoint (
VOID
TrustedWorldInitialization (
- IN UINTN MpId
+ IN UINTN MpId,
+ IN UINTN SecBootMode
)
{
UINTN JumpAddress;
@@ -153,7 +155,7 @@ TrustedWorldInitialization (
// Signal the secondary core the Security settings is done (event: EVENT_SECURE_INIT)
ArmCallSEV ();
}
- } else {
+ } else if ((SecBootMode & ARM_SEC_BOOT_MASK) == ARM_SEC_COLD_BOOT) {
// The secondary cores need to wait until the Trustzone chipsets configuration is done
// before switching to Non Secure World