summaryrefslogtreecommitdiff
path: root/edk2/ArmPlatformPkg/Sec/Sec.c
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-01 14:33:26 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-01 14:33:26 +0000
commitb3f453492b9329988998ee2f377b15dd8ee94ed0 (patch)
treebca40fddb20ee2b9b35555b35292e5c41a25e823 /edk2/ArmPlatformPkg/Sec/Sec.c
parentd18f30d4d7a2c755806a731efe499c61a225b783 (diff)
ArmPlatformPkg: Add support for PrePi module
This module is enabled for ArmRealViewEb and ArmvExpress builds when the macro EDK2_SKIP_PEICORE is passed to the build system. The PrePi module can be used when the DRAM has already been initialized by the SEC phase/1st stage boot loader and no call to external PEIM is required. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@11953 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/ArmPlatformPkg/Sec/Sec.c')
-rw-r--r--edk2/ArmPlatformPkg/Sec/Sec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/edk2/ArmPlatformPkg/Sec/Sec.c b/edk2/ArmPlatformPkg/Sec/Sec.c
index faa012ab4..8ddc654c2 100644
--- a/edk2/ArmPlatformPkg/Sec/Sec.c
+++ b/edk2/ArmPlatformPkg/Sec/Sec.c
@@ -227,6 +227,18 @@ CEntryPoint (
// Enter Secondary Cores into non Secure State. To enter into Non Secure state, we need to make a return from exception
return_from_exception((UINTN)NonSecureWaitForFirmware);
}
+ } else if (FeaturePcdGet(PcdSkipPeiCore)) {
+ if (CoreId == ARM_PRIMARY_CORE) {
+ // Signal the secondary cores they can jump to PEI phase
+ PL390GicSendSgiTo (PcdGet32(PcdGicDistributorBase), GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E);
+
+ // To enter into Non Secure state, we need to make a return from exception
+ return_from_exception(PcdGet32(PcdNormalFvBaseAddress));
+ } else {
+ // We wait for the primary core to finish to initialize the System Memory. When we skip PEI Core, we could set the stack in DRAM
+ // Without this synchronization the secondary cores will complete the SEC before the primary core has finished to intitialize the DRAM.
+ return_from_exception((UINTN)NonSecureWaitForFirmware);
+ }
} else {
// To enter into Non Secure state, we need to make a return from exception
return_from_exception(PcdGet32(PcdNormalFvBaseAddress));