[PATCH v3 00/29] arm: semihosting: Cleanups and new features

Sean Anderson sean.anderson at seco.com
Wed Mar 23 00:21:30 CET 2022

On 3/22/22 6:11 PM, Heinrich Schuchardt wrote:
> On 3/22/22 21:59, Sean Anderson wrote:
>> This cleans up the semihosting code and adds the following new features:
>> - hostfs support (like sandbox)
>> - support for being used as a SPL boot device
>> - serial device support
>> - falling back to normal drivers if semihosting is disabled
>> The main device affected by these changes is vexpress64, so I'd appreciate
>> if Andre (or anyone else) could try booting.
>> These changes are motivated by bringup for ls1046a. When forcing JTAG
>> boot, this device disables most communication peripherals, including
>> serial and ethernet devices. This appears to be fixed in later
>> generation devices, but we are stuck with it for now. Semihosting
>> provides an easy way to run a few console commands.
>> The patches in this series are organized as follows:
>> 0-4: rST conversions and other documentation updates
>> 5-9: Semihosting cleanups
>> 10-14: Filesystem support (including SPL boot device)
>> 15-16: Serial support
>> 16: Documentation update
>> 17: JTAG boot support for LS1046A
>> 19-25: Semihosting fallback
>> 26-29: DM puts support
>> The last two groups of patches are "bonus;" the first 17 patches stand
>> on their own. The last two groups could be broken out as separate
>> series, but I have kept them in this one to help with my sanity (and not
>> have to deal with too many outstanding series).
>> Patch 14 depends on [1] to apply cleanly. Patch 17 depends on [2] for
>> correctness. This series should be applied to u-boot/next (in
>> particular, the EROFS series must have been applied).
> Treating semihosting like the sandbox host file system is valuable
> change. Thanks for addressing this.
> Semihosting is not ARM specific. On QEMU it is available for ARM, M68K,
> Xtensa, MIPS, Nios II, RISC-V. Cf.
> https://qemu.readthedocs.io/en/latest/system/qemu-manpage.html
> A good part of the code should be moved out of arch/arm/.

I agree that this code is mostly not arm-specific. However, this series is
already very long, so I would like to defer moving these files for a later
series (probably done on my personal time).

In addition, I think it when doing this we will need to determine what is
arm/riscv-specific and what can be shared between arches. From the link you
sent, it seems like m68k/xtensa/mips/nios2 use a different API than


More information about the U-Boot mailing list