summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64
Commit message (Collapse)AuthorAgeFilesLines
* ArmPkg: Fix various typosAntoine Cœur2019-07-041-1/+1
| | | | | | | Fix various typos in ArmPkg. Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib: use console if availableArd Biesheuvel2019-01-161-2/+10
| | | | | | | | | | | | Print the minimal 'exception occurred' message to the console as well as to the serial port if the console is available. This makes such messages visible on systems where the console is graphical and the serial is not connected. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmPkg/DefaultExceptionHandlerLib: walk call stack unconditionallyArd Biesheuvel2017-03-221-25/+31
| | | | | | | | | | | | Currently, we only attempt to walk the call stack and print a backtrace if the program counter refers to a location covered by a PE/COFF image. However, regardless of the value of PC, the frame pointer may still have a meaningful value, and so we can still produce the remainder of the backtrace. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib: improve formatting of backtraceArd Biesheuvel2016-09-141-19/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the backtrace formattting suggested by Andrew, i.e., IRQ Exception at 0x000000005BE182B0 PC 0x00005BE182B0 (0x00005BE14000+0x000042B0) [ 0] ArmCpuDxe.dll PC 0x00005BE15770 (0x00005BE14000+0x00001770) [ 0] ArmCpuDxe.dll PC 0x00005EF08CC8 (0x00005EEEB000+0x0001DCC8) [ 1] DxeCore.dll PC 0x00005EF09008 (0x00005EEEB000+0x0001E008) [ 1] DxeCore.dll PC 0x00005EEF6ACC (0x00005EEEB000+0x0000BACC) [ 1] DxeCore.dll PC 0x00005EF0963C (0x00005EEEB000+0x0001E63C) [ 1] DxeCore.dll PC 0x00005EF09A38 (0x00005EEEB000+0x0001EA38) [ 1] DxeCore.dll PC 0x00005EF01560 (0x00005EEEB000+0x00016560) [ 1] DxeCore.dll PC 0x00005EF02FB4 (0x00005EEEB000+0x00017FB4) [ 1] DxeCore.dll PC 0x00005EF03098 (0x00005EEEB000+0x00018098) [ 1] DxeCore.dll PC 0x00005EF0460C (0x00005EEEB000+0x0001960C) [ 1] DxeCore.dll PC 0x00005EF005C4 (0x00005EEEB000+0x000155C4) [ 1] DxeCore.dll PC 0x00005EF00360 (0x00005EEEB000+0x00015360) [ 1] DxeCore.dll PC 0x00005EF003C8 (0x00005EEEB000+0x000153C8) [ 1] DxeCore.dll PC 0x00005EF128D0 (0x00005EEEB000+0x000278D0) [ 1] DxeCore.dll PC 0x00005EF12930 (0x00005EEEB000+0x00027930) [ 1] DxeCore.dll PC 0x00005EEEF594 (0x00005EEEB000+0x00004594) [ 1] DxeCore.dll PC 0x00005EF0CF18 (0x00005EEEB000+0x00021F18) [ 1] DxeCore.dll PC 0x00005EF1A310 (0x00005EEEB000+0x0002F310) [ 1] DxeCore.dll PC 0x00005EEF1808 (0x00005EEEB000+0x00006808) [ 1] DxeCore.dll PC 0x00005EEF1E48 (0x00005EEEB000+0x00006E48) [ 1] DxeCore.dll PC 0x00005EF0A838 (0x00005EEEB000+0x0001F838) [ 1] DxeCore.dll PC 0x00005EEED70C (0x00005EEEB000+0x0000270C) [ 1] DxeCore.dll PC 0x00005EEEC93C (0x00005EEEB000+0x0000193C) [ 1] DxeCore.dll PC 0x00005EEEC024 (0x00005EEEB000+0x00001024) [ 1] DxeCore.dll [ 0] /home/ard/build/edk2/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/ArmPkg/Drivers/CpuDxe/CpuDxe/DEBUG/ArmCpuDxe.dll [ 1] /home/ard/build/edk2/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib: trim module name in backtrace outputArd Biesheuvel2016-09-091-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Vishal, the new backtrace output would be more useful if it did not contain the full absolute path of each module in the list. So strip off everything up to the last forward slash or backslash in the string. Example output: IRQ Exception at 0x000000005EF110E0 DxeCore.dll loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EF121F0) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EF1289C) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEFB6B4) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEFAA44) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEFB450) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEF938C) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEF8D04) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEFA8E8) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEF3C14) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEF3E48) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EF0C838) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEEF70C) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEEE93C) loaded at 0x000000005EEED000 called from DxeCore.dll (0x000000005EEEE024) loaded at 0x000000005EEED000 Suggested-by: "Oliyil Kunnil, Vishal" <vishalo@qti.qualcomm.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dumpArd Biesheuvel2016-09-071-0/+21
| | | | | | | | | | | | | When dumping the CPU state after an unhandled fault, walk the stack frames and decode the return addresses so we can show a minimal backtrace. Unfortunately, we do not have sufficient information to show the function names, but at least we can see the modules and the return addresses inside the modules. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib: put ASSERT (FALSE) lastArd Biesheuvel2016-07-011-1/+1
| | | | | | | | | | | Putting DEBUG () code after an ASSERT (FALSE) statement is not very useful, since the code will be unreachable on DEBUG builds and compiled out on RELEASE builds. So move the ASSERT () statement after it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib: fix typoArd Biesheuvel2016-05-091-1/+1
| | | | | | | Replace : with ; which was changes accidentally. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib: add stack dump to exception handling codeArd Biesheuvel2016-05-091-0/+21
| | | | | | | | | | | This adds a partial stack dump (256 bytes at either side of the stack pointer) to the CPU state dumping routine that is invoked when taking an unexpected exception. Since dereferencing the stack pointer may itself fault, ensure that we don't enter the dumping routine recursively. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib: use deadloop rather than ASSERTArd Biesheuvel2016-05-091-1/+3
| | | | | | | | | | | | | | | | 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>
* ArmPkg: DefaultExceptionHandler fixes for use with DxeCoreCohen, Eugene2016-02-151-2/+0
| | | | | | | | | | | Modify the DefaultExceptionHandler (uefi-variant) so it can be used by DxeCore (via CpuExceptionHandlerLib) where the debug info table is not yet published at library constructor time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPkg/DefaultExceptionHandlerLib/Aarch64: Added friendly debug messageOlivier Martin2014-06-031-4/+79
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15549 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg: Added Aarch64 supportHarry Liebel2013-07-181-0/+112
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14486 6f19259b-4bc3-4df7-8a09-765794883524