u-boot-brain/arch/arm
Heinrich Schuchardt 0c1456d571 ARM: correct detection of thumb mode
When a crash occurs in thumb mode the crash dump is incorrect. This is due
to the usage of a non-existing configuration variable CONFIG_ARM_THUMB in
the definition of macro thumb_mode(regs).

Use CONFIG_IS_ENABLED(SYS_THUMB_BUILD) to detect that the code has been
compiled for thumb mode. Remove ARM_THUMB from config_whitelist.txt.

With the patch crash dumps indicate thumb mode correctly.

On a system with thumb mode:

=> exception unaligned
data abort
pc : [<8f7a2b52>]          lr : [<8f7ab1ef>]
reloc pc : [<1780cb52>]    lr : [<178151ef>]
sp : 8ed8c3f8  ip : 8f7a2b4d     fp : 00000002
r10: 8f7f8228  r9 : 8ed95ea8     r8 : 8ed99488
r7 : 8f7ab141  r6 : 00000000     r5 : 8ed8c3f9  r4 : 8f7f6390
r3 : 8ed9948c  r2 : 00000001     r1 : 00000000  r0 : 8f7f6390
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32 (T)
Code: 8f7e 466d f105 0501 (e9d5) 6700

The Flags line has '(T)' and in the Code line the output is in u16 groups.

On a system without thumb mode:

=> exception breakpoint
prefetch abort
pc : [<7ff5a5c8>]          lr : [<7ff675ec>]
reloc pc : [<0000e5c8>]    lr : [<0001b5ec>]
sp : 7ee0ad80  ip : 7ff5a5cc     fp : 7ff674cc
r10: 00000002  r9 : 7ef0bed8     r8 : 7ffd6214
r7 : 7ef0e080  r6 : 00000000     r5 : 7ffd4090  r4 : 00000000
r3 : 7ef0e084  r2 : 00000001     r1 : 00000000  r0 : 7ffd4090
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
Code: e1a0500d e2855001 e1c560d0 e3a00001 (e12fff1e)

The Flags line does not show '(T)' and in the Code line the output is in
u32 groups.

Reported-by: Marek Vasut <marex@denx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
2019-07-18 11:31:24 -04:00
..
cpu UniPhier SoC updates for v2019.10 2019-07-11 18:08:44 -04:00
dts Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi 2019-07-16 11:19:31 -04:00
include ARM: correct detection of thumb mode 2019-07-18 11:31:24 -04:00
lib arm64: add an option to switch visibility of CONFIG_SYS_INIT_SP_BSS_OFFSET 2019-07-10 22:37:23 +09:00
mach-aspeed
mach-at91 First set of u-boot-atmel fixes for 2019.07 cycle 2019-06-10 09:41:00 -04:00
mach-bcm283x ARM: bcm283x: Fix definition of MBOX_TAG_TEST_PIXEL_ORDER 2019-06-12 12:23:46 +02:00
mach-bcmstb
mach-davinci arm: davinci: remove leftover assembly 2019-06-05 12:14:02 -04:00
mach-exynos CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-highbank
mach-imx configs: Rename CONFIG_IMAGE_FORMAT_LEGACY to CONFIG_LEGACY_IMAGE_FORMAT 2019-07-11 14:11:18 -04:00
mach-integrator
mach-k3 arm: k3: config.mk: Use k3_gen_x509_cert.sh to generate boot images 2019-05-09 20:22:05 -04:00
mach-keystone CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-kirkwood km: modify Kconfig file organization for KM boards 2019-07-11 10:58:03 +02:00
mach-mediatek arm: mediatek: remove arch_misc_init 2019-07-07 17:38:55 -04:00
mach-meson ARM: meson: add unique MAC address generation 2019-07-04 16:04:59 +02:00
mach-mvebu arm: mvebu: set 38x and 39x AVS on lower frequency 2019-07-11 10:58:03 +02:00
mach-omap2 configs: Make USE_TINY_PRINTF depend on SPL||TPL and be default 2019-07-13 11:11:29 -04:00
mach-orion5x
mach-owl
mach-qemu
mach-rmobile configs: Make USE_TINY_PRINTF depend on SPL||TPL and be default 2019-07-13 11:11:29 -04:00
mach-rockchip rockchip: make_fit_atf.py: fix loadables property set error 2019-07-05 15:57:52 +08:00
mach-s5pc1xx CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-snapdragon arm: mach-snapdragon: pinctrl: clarify gpio disable bit 2019-01-25 12:12:56 -05:00
mach-socfpga arm: socfpga: provide default SPL_SIZE_LIMIT for gen5 2019-06-14 12:41:26 +02:00
mach-sti
mach-stm32 mach-stm32: Fix MPU region size dedicated to SDRAM for STM32F4 2019-06-28 09:45:27 +02:00
mach-stm32mp stm32mp1: bsec: Fix warnings when compiling with W=1 2019-07-12 11:50:54 +02:00
mach-sunxi sunxi: H6: Enable USB for existing boards 2019-07-16 17:13:15 +05:30
mach-tegra arm64: add an option to switch visibility of CONFIG_SYS_INIT_SP_BSS_OFFSET 2019-07-10 22:37:23 +09:00
mach-uniphier ARM: uniphier: set {kernel, ramdisk, fdt}_addr_r at boot-time 2019-07-10 22:42:09 +09:00
mach-versal arm64: versal: Move IOU_SWITCH_DIVISOR0 to Kconfig 2019-02-14 14:31:10 +01:00
mach-versatile
mach-zynq CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-zynqmp arm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI 2019-04-16 11:52:02 +02:00
mach-zynqmp-r5
thumb1/include/asm/proc-armv
config.mk
Kconfig Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi 2019-07-16 11:19:31 -04:00
Kconfig.debug
Makefile arm: imx: build mach-imx for i.MX8 2019-01-28 20:35:47 +01:00