u-boot/arch/arm/lib
Sean Anderson 385d69d76b arm: smh: Add option to detect semihosting
These functions are intended to support detecting semihosting and
falling back gracefully to alternative implementations. The test starts
by making semihosting call. SYS_ERRNO is chosen because it should not
mutate any state. If this semihosting call results in an exception
(rather than being caught by the debugger), then the exception handler
should call disable_semihosting() and resume execution after the call.

Ideally, this would just be part of semihosting by default, and not a
separate config. However, to reduce space ARM SPL doesn't include
exception vectors by default. This means we can't detect if a
semihosting call failed unless we enable them. To avoid forcing them to
be enabled, we use a separate config option. It might also be possible
to try and detect whether a debugger has enabled (by reading HDE from
DSCR), but I wasn't able to figure out a way to do this from all ELs.

This patch just introduces the generic code to handle detection. The
next patch will implement it for arm64 (but not arm32).

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-04-01 16:56:53 -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 arm: Remove zmx25 board and ARCH_MX25 2021-10-01 21:08:18 -04:00
asmdefs.h arm64: arch/arm/lib: Add optimized memset/memcpy/memmove functions 2021-09-24 07:48:06 -04:00
bdinfo.c Merge branch '2021-02-02-drop-asm_global_data-when-unused' 2021-02-15 10:16:45 -05:00
bootm-fdt.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
bootm.c image: Drop IMAGE_ENABLE_OF_LIBFDT 2021-10-08 15:53:26 -04:00
cache-cp15.c arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable 2021-07-09 11:36:12 -04:00
cache-pl310.c ARM: cache: Fix incorrect bitwise operation 2019-02-28 14:21:46 -05:00
cache.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
ccn504.S WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
cmd_boot.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
crt0.S arm: Init the debug UART 2021-11-17 17:04:59 -05:00
crt0_64.S Prepare v2022.01-rc3 2021-11-29 12:00:57 -05:00
crt0_aarch64_efi.S efi_loader: fix SectionAlignment, FileAlignment 2022-01-15 10:57:22 +01:00
crt0_arm_efi.S efi_loader: fix SectionAlignment, FileAlignment 2022-01-15 10:57:22 +01: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 common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
div64.S WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -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 efi_loader: fix SectionAlignment, FileAlignment 2022-01-15 10:57:22 +01:00
elf_arm_efi.lds efi_loader: fix SectionAlignment, FileAlignment 2022-01-15 10:57:22 +01:00
gic-v3-its.c Revert "arch: arm: use dt and UCLASS_SYSCON to get gic lpi details" 2021-10-31 08:46:29 -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 common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
interrupts.c reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
interrupts_64.c arm64: Save esr in pt_regs 2022-04-01 16:56:53 -04:00
interrupts_m.c reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
lib1funcs.S WS cleanup: remove trailing white space 2021-09-30 08:08:56 -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 spl: Add semihosting boot method 2022-04-01 15:03:13 -04:00
memcpy-arm64.S arm64: arch/arm/lib: Add optimized memset/memcpy/memmove functions 2021-09-24 07:48:06 -04:00
memcpy.S arm: Fix bad memcpy.S str8w macro argument count 2021-11-15 14:33:32 -05:00
memset-arm64.S arm64: memset-arm64: Use simple memset when cache is disabled 2021-09-24 07:48:06 -04: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 treewide: use CONFIG_IS_ENABLED() for ARMV8_SEC_FIRMWARE_SUPPORT 2020-12-04 16:09:05 -05: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 armv7: Add Position Independent Execution support 2021-09-02 09:48:20 -04:00
relocate_64.S common: Move relocate_code() to init.h 2020-01-17 13:26:49 -05:00
reset.c reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
sections.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
semihosting.c arm: smh: Add option to detect semihosting 2022-04-01 16:56:53 -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 spl: Make use of CONFIG_IS_ENABLED(OS_BOOT) in SPL/TPL common code paths 2021-11-05 11:23:29 -04:00
stack.c lmb: arm: Increase LMB alignment to 16k in arch_lmb_reserve_generic() 2021-09-23 14:15:32 -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: Use correct symbol to hide messages in SPL 2021-04-27 08:05:30 -04:00