diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-05-09 16:14:15 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-05-09 17:24:52 +0200 |
commit | 1549fb607b50c814072d18229ca423acb150cb68 (patch) | |
tree | 8c727992e5ed751814f8f2ae9a436ac4776f3126 /ArmPkg/Library/DefaultExceptionHandlerLib | |
parent | 275d51369a55952c7d75399752c7269a16ff03de (diff) | |
download | edk2-1549fb607b50c814072d18229ca423acb150cb68.zip edk2-1549fb607b50c814072d18229ca423acb150cb68.tar.gz edk2-1549fb607b50c814072d18229ca423acb150cb68.tar.bz2 |
ArmPkg/DefaultExceptionHandlerLib: use deadloop rather than ASSERT
The default exception handler, which is essentially the one that is invoked
for unexpected exceptions, ends with an ASSERT (FALSE), to ensure that
execution halts after dumping the CPU state. However, ASSERTs are compiled
out in RELEASE builds, and since we simply return to wherever the ELR is
pointing, we will not make any progress in case of synchronous aborts, and
the same exception will be taken again immediately, resulting in the string
'Exception at 0x....' to be printed over and over again.
So use an explicit deadloop instead.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg/Library/DefaultExceptionHandlerLib')
-rw-r--r-- | ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c index 37fd578..df30c4f 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c @@ -181,5 +181,7 @@ DefaultExceptionHandler ( DEBUG ((EFI_D_ERROR, "\n ESR : EC 0x%02x IL 0x%x ISS 0x%08x\n", (SystemContext.SystemContextAArch64->ESR & 0xFC000000) >> 26, (SystemContext.SystemContextAArch64->ESR >> 25) & 0x1, SystemContext.SystemContextAArch64->ESR & 0x1FFFFFF ));
DescribeExceptionSyndrome (SystemContext.SystemContextAArch64->ESR);
- ASSERT (FALSE);
+ ASSERT (FALSE):
+
+ CpuDeadLoop ();
}
|