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>
This commit is contained in:
Ard Biesheuvel 2018-12-11 14:23:28 +01:00
parent d05d5f6c85
commit 5c8bc8be9e
1 changed files with 2 additions and 0 deletions

View File

@ -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;