summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-02 20:15:49 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-02 20:15:49 +0000
commitcfe1bb1765593aa117786f2973b9b0714680bf23 (patch)
tree2d55946618a48e0280dd1e7717c0b71ed9e1ccb5 /ArmPlatformPkg
parent9d59a88be171f74ae08ad63b3e8d1b77a87522e8 (diff)
downloadedk2-cfe1bb1765593aa117786f2973b9b0714680bf23.tar.gz
edk2-cfe1bb1765593aa117786f2973b9b0714680bf23.tar.bz2
edk2-cfe1bb1765593aa117786f2973b9b0714680bf23.zip
ArmPlatformPkg/DebugSecExtraActionLib: Added Warning comment to signal the DRAM must be inititalized at this stage
Since the System Memory initialization has been moved inside ArmPlatformSecLib on some platforms, the use of this library could crash if the firmware engineer forgot to initialize the DRAM. This library 'patches' the DRAM to add an infinite loop. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13262 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg')
-rwxr-xr-xArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c b/ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c
index 471a42c1ab..2497da1092 100755
--- a/ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c
+++ b/ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c
@@ -64,6 +64,11 @@ ArmPlatformSecExtraAction (
UINTN CharCount;
if (FeaturePcdGet (PcdStandalone) == FALSE) {
+
+ //
+ // Warning: This code assumes the DRAM has already been initialized by ArmPlatformSecLib
+ //
+
if (IS_PRIMARY_CORE(MpId)) {
UINTN* StartAddress = (UINTN*)PcdGet32(PcdFvBaseAddress);
@@ -85,6 +90,11 @@ ArmPlatformSecExtraAction (
*JumpAddress = (UINTN)NonSecureWaitForFirmware;
}
} else if (FeaturePcdGet (PcdSystemMemoryInitializeInSec)) {
+
+ //
+ // Warning: This code assumes the DRAM has already been initialized by ArmPlatformSecLib
+ //
+
if (IS_PRIMARY_CORE(MpId)) {
// Signal the secondary cores they can jump to PEI phase
ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E, PcdGet32 (PcdGicSgiIntId));