[PATCH 00/17] arm: semihosting: Cleanups and new features
Sean Anderson
sean.anderson at seco.com
Thu Mar 3 21:43:43 CET 2022
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
The main device affected by these changes is vexpress64, so I'd appreciate
if Linus (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.
Future work could include modifying one of the reset handlers to catch
semihosting calls not handled by a debugger. This would allow using the
same U-Boot when booting from JTAG and when booting normally.
Additionally, we could use puts in more places. DM serial is especially
slow with semihisting because all we have is putc.
The patches in this series are organized as follows:
0-3: rST conversions and other documentation updates
4-8: Semihosting cleanups
9-13: Filesystem support (including SPL boot device)
14-15: Serial support
16: Documentation update
17: JTAG boot support for LS1046A
Patch 17 depends on [1].
[1] https://lore.kernel.org/u-boot/20220222183840.1355337-2-sean.anderson@seco.com/
Sean Anderson (17):
doc: Convert semihosting readme to rST
nxp: ls1046ardb: Convert README to rST
doc: ls1046ardb: Expand boot mode section
arm: smh: Add semihosting entry to MAINTAINERS
arm: smh: Export semihosting functions
arm: smh: Use numeric modes for smh_open
arm: smh: Return errno on error
arm: smh: Document functions in header
arm: smh: Add some file manipulation commands
spl: Add semihosting boot method
fs: Add semihosting filesystem
cmd: fdt: Use start/size for chosen instead of start/end
arm: smh: Remove smhload command
arm: smh: Add some functions for working with the host console
serial: Add semihosting driver
doc: smh: Update semihosting documentation
ls1046ardb: Add support for JTAG boot
MAINTAINERS | 4 +
arch/arm/Kconfig | 25 ++-
arch/arm/cpu/armv8/fsl-layerscape/spl.c | 2 +
arch/arm/include/asm/spl.h | 1 +
arch/arm/lib/semihosting.c | 209 ++++++++++--------------
board/freescale/ls1046ardb/MAINTAINERS | 1 +
board/freescale/ls1046ardb/README | 76 ---------
cmd/fdt.c | 6 +-
common/spl/Makefile | 1 +
common/spl/spl_semihosting.c | 71 ++++++++
configs/vexpress_aemv8a_semi_defconfig | 2 +-
disk/part.c | 4 +-
doc/README.semihosting | 38 -----
doc/board/nxp/index.rst | 1 +
doc/board/nxp/ls1046ardb.rst | 182 +++++++++++++++++++++
doc/usage/index.rst | 1 +
doc/usage/semihosting.rst | 51 ++++++
drivers/serial/Kconfig | 22 +++
drivers/serial/Makefile | 1 +
drivers/serial/serial.c | 2 +
drivers/serial/serial_semihosting.c | 108 ++++++++++++
fs/Makefile | 1 +
fs/fs.c | 20 +++
fs/semihostingfs.c | 115 +++++++++++++
include/configs/ls1046ardb.h | 2 +
include/fs.h | 1 +
include/semihosting.h | 108 ++++++++++++
include/semihostingfs.h | 21 +++
28 files changed, 832 insertions(+), 244 deletions(-)
delete mode 100644 board/freescale/ls1046ardb/README
create mode 100644 common/spl/spl_semihosting.c
delete mode 100644 doc/README.semihosting
create mode 100644 doc/board/nxp/ls1046ardb.rst
create mode 100644 doc/usage/semihosting.rst
create mode 100644 drivers/serial/serial_semihosting.c
create mode 100644 fs/semihostingfs.c
create mode 100644 include/semihosting.h
create mode 100644 include/semihostingfs.h
--
2.25.1
More information about the U-Boot
mailing list