u-boot/arch/arm/lib
Heinrich Schuchardt 57bbf44de6 arm64: print instructions leading to exception
If an exception occurs in a loaded image and the relocation offset is
unknown, it is helpful to know the instructions pointed to by the
program counter. This patch adds the missing output.

A possible output is:
    Code: 910c4021 aa1303e0 f9400662 d63f0040 (e7f7defb)

The parentheses indicate the instruction causing the exception.

The output can be disassembled using scripts/decodecode:

echo 'Code: 90000360 9100b800 94002782 17ffff8f (e7f7defb)' | \
  ARCH=arm64 scripts/decodecode

Code: 90000360 9100b800 94002782 17ffff8f (e7f7defb)
All code
========
   0:   90000360    adrp    x0, 0x6c000
   4:   9100b800    add     x0, x0, #0x2e
   8:   94002782    bl      0x9e10
   c:   17ffff8f    b       0xfffffffffffffe48
  10:*  e7f7defb    .inst   0xe7f7defb ; undefined <-- trapping instruction

Code starting with the faulting instruction
===========================================
   0:   e7f7defb    .inst   0xe7f7defb ; undefined

We already have implemented the same for armv7.

For testing command 'exception undefined' can be used.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-11 15:33:27 -04:00
..
ashldi3.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ashrdi3.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
asm-offsets.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bootm-fdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bootm.c env: Move env_get() to env.h 2019-08-11 16:43:41 -04:00
cache-cp15.c CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
cache-pl310.c ARM: cache: Fix incorrect bitwise operation 2019-02-28 14:21:46 -05:00
cache.c board_f: fix noncached reservation calculation 2019-08-30 14:17:11 -04:00
ccn504.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cmd_boot.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
crt0.S spl: Allow performing BSS init early before board_init_f() 2019-07-17 11:12:54 -04:00
crt0_64.S arm64: add an option to switch visibility of CONFIG_SYS_INIT_SP_BSS_OFFSET 2019-07-10 22:37:23 +09:00
crt0_aarch64_efi.S efi_loader: use predefined constants in crt0_*_efi.S 2019-07-16 22:17:14 +00:00
crt0_arm_efi.S efi_loader: use predefined constants in crt0_*_efi.S 2019-07-16 22:17:14 +00:00
debug.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
div0.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
div64.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
eabi_compat.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
elf_aarch64_efi.lds SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
elf_arm_efi.lds SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gic_64.S arm64: gic: Do gicv3 secure initialization based on EL level 2018-10-16 14:58:46 +02:00
image.c ARM: image: Add option for ignoring ep bit 3 2018-06-19 07:31:45 -04:00
interrupts.c arm: do not include efi_loader.h twice 2018-10-16 16:41:01 +02:00
interrupts_64.c arm64: print instructions leading to exception 2019-10-11 15:33:27 -04:00
interrupts_m.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lib1funcs.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lshrdi3.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile efi_selftest: allow building on ARMv7-M 2019-02-13 09:40:05 +01:00
memcpy.S arm: Make arch specific memcpy thumb-safe. 2018-11-16 16:51:57 -05:00
memset.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
muldi3.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
psci-dt.c ARM: PSCI: Enable the PSCI node 2018-07-26 13:15:30 -07:00
reloc_aarch64_efi.c arm: Remove unused _relocate arguments 2018-07-19 16:31:36 -04:00
reloc_arm_efi.c arm: Remove unused _relocate arguments 2018-07-19 16:31:36 -04:00
relocate.S arm: armv7m: clean up armv7m unified code compilation 2018-09-10 21:19:33 -04:00
relocate_64.S arm: arm64 32bit address relocation 2019-04-22 18:13:24 -04:00
reset.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sections.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
semihosting.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
setjmp.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
setjmp_aarch64.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
stack.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
uldivmod.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
vectors.S arm: remove ARCH_ROCKCHIP macro in common code 2019-05-08 17:34:12 +08:00
vectors_m.S arm: armv7m: clean up armv7m unified code compilation 2018-09-10 21:19:33 -04:00
zimage.c arm: zimage: add barebox image magic number 2019-05-09 20:21:59 -04:00