u-boot/arch/arm
Sean Anderson bbe310cdaf arm64: Catch non-emulated semihosting calls
If a debugger is not attached to U-Boot, semihosting calls will raise a
synchronous abort exception. Try to catch this and disable semihosting
so we can e.g. use another uart if one is available. In the immediate
case, we return an error, since it is not always possible to check for
semihosting beforehand (debug uart, user-initiated load command, etc.)

We handle all possible semihosting instructions, which is probably
overkill. However, we do need to keep track of what instruction set
we're using so that we don't suppress an actual error.

A future enhancement could try to determine semihosting capability by
inspecting the processor state.  There's an example of this at [1] for
RISC-V. The equivalent for ARM would inspect the monitor modei
enable/select bits of the DSCR. However, as the article notes, an
exception handler is still helpful in order to catch disconnected
debuggers.

[1] https://tomverbeure.github.io/2021/12/30/Semihosting-on-RISCV.html#avoiding-hangs-when-a-debugger-is-not-connected

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-04-01 16:56:53 -04:00
..
cpu arm64: Save spsr in pt_regs 2022-04-01 16:56:53 -04:00
dts vexpress64: Add ARMv8R-64 board variant 2022-04-01 15:03:03 -04:00
include arm64: Import some ESR and SPSR defines from Linux 2022-04-01 16:56:53 -04:00
lib arm64: Catch non-emulated semihosting calls 2022-04-01 16:56:53 -04:00
mach-apple arm: apple: Fix mem layout 2022-03-28 08:22:17 -04:00
mach-aspeed ast2600: spl: Locate load buffer in DRAM space 2021-11-17 17:05:00 -05:00
mach-at91 Convert CONFIG_AT91_WANTS_COMMON_PHY to Kconfig 2022-03-25 12:01:15 +00:00
mach-bcm283x doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mach-bcmstb
mach-cortina
mach-davinci Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
mach-exynos exynos: Drop CONFIG_CLK_* 2022-04-01 10:28:47 -04:00
mach-highbank
mach-imx arm64: Save esr in pt_regs 2022-04-01 16:56:53 -04:00
mach-integrator
mach-ipq40xx
mach-k3 arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT 2022-03-04 15:20:06 -05:00
mach-keystone arch/arm/mach-keystone/ddr3.c: Fix spelling of "resetting". 2022-01-13 07:57:50 -05:00
mach-kirkwood keymile: Move sourcing of common Kconfig 2022-04-01 10:28:46 -04:00
mach-lpc32xx
mach-mediatek
mach-meson ARM: amlogic: add sm efuse write support and cmd for read/write efuse 2021-10-29 14:06:45 +02:00
mach-mvebu db-mv784mp-gp: Rename CONFIG_DB_784MP_GP to CONFIG_TARGET_DB_MV784MP_GP 2022-04-01 10:28:47 -04:00
mach-nexell video: Drop references to CONFIG_VIDEO et al 2022-03-28 20:17:07 +02:00
mach-octeontx Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-octeontx2 Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-omap2 Convert CONFIG_CLOCK_SYNTHESIZER to Kconfig 2022-04-01 10:28:47 -04:00
mach-orion5x Convert CONFIG_88F5182 et al to Kconfig 2021-12-27 16:20:19 -05:00
mach-owl
mach-qemu
mach-rmobile armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
mach-rockchip rockchip: Set default LNX_KRNL_IMG_TEXT_OFFSET_BASE to SYS_TEXT_BASE 2022-03-18 18:12:03 +08:00
mach-s5pc1xx doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mach-snapdragon board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board 2021-10-31 11:25:38 -04:00
mach-socfpga keymile: Move sourcing of common Kconfig 2022-04-01 10:28:46 -04:00
mach-sti
mach-stm32
mach-stm32mp stm32mp: psci: Implement PSCI system suspend and DRAM SSR 2022-03-15 09:16:55 +01:00
mach-sunxi sunxi: Fix old GMAC pinmux setup 2022-03-26 00:16:06 +00:00
mach-tegra Merge https://source.denx.de/u-boot/custodians/u-boot-marvell 2022-01-20 12:40:20 -05:00
mach-u8500
mach-uniphier
mach-versal xilinx: Remove GPIO_EXTRA_HEADER selection 2022-02-15 13:06:13 +01:00
mach-versatile
mach-zynq ARM: zynq: Fix debug uart initialization 2022-02-21 13:20:24 +01:00
mach-zynqmp arm64: zynqmp: Fix debug uart initialization 2022-02-21 13:20:29 +01:00
mach-zynqmp-r5 Convert CONFIG_CPU_FREQ_HZ to Kconfig 2021-12-27 16:20:19 -05:00
thumb1/include/asm/proc-armv
config.mk
Kconfig arm: smh: Add option to detect semihosting 2022-04-01 16:56:53 -04:00
Kconfig.debug
Makefile arm: apple: Add initial support for Apple's M1 SoC 2021-10-31 08:46:44 -04:00