diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2018-12-11 14:23:28 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2018-12-19 21:03:08 +0100 |
commit | 5c8bc8be9e5e4665ab7e31558db9e3fe9990a13e (patch) | |
tree | 34d97a53cbb8094933573694386e0a38f01e2cb7 /ArmPkg | |
parent | d05d5f6c85e926a0a21da4bd6d5afe766345d6a5 (diff) | |
download | edk2-5c8bc8be9e5e4665ab7e31558db9e3fe9990a13e.zip edk2-5c8bc8be9e5e4665ab7e31558db9e3fe9990a13e.tar.gz edk2-5c8bc8be9e5e4665ab7e31558db9e3fe9990a13e.tar.bz2 |
ArmPkg/DefaultExceptionHandlerLib ARM: avoid endless loop in RELEASE builds
Ensure that we prevent the CPU from proceeding after having taken an
unhandled exception on a RELEASE build, which does not contain the
ASSERT() which ensures this on DEBUG and NOOPT builds.
Retain the code following the deadloop so that we can keep going when
running in a debugger.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg')
-rw-r--r-- | ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c b/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c index 0b9da03..cc79cb2 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c @@ -267,6 +267,8 @@ DefaultExceptionHandler ( DEBUG ((EFI_D_ERROR, "\n"));
ASSERT (FALSE);
+ CpuDeadLoop (); // may return if executing under a debugger
+
// Clear the error registers that we have already displayed incase some one wants to keep going
SystemContext.SystemContextArm->DFSR = 0;
SystemContext.SystemContextArm->IFSR = 0;
|