[PATCH v3 22/29] arm: smh: Add option to detect semihosting
Tom Rini
trini at konsulko.com
Sun Apr 3 02:16:31 CEST 2022
On Tue, Mar 22, 2022 at 04:59:30PM -0400, Sean Anderson wrote:
> 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 at seco.com>
Applied to u-boot/next, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220402/91f1d88c/attachment.sig>
More information about the U-Boot
mailing list