All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/28] arm: semihosting: Cleanups and new features
@ 2022-03-10 20:50 Sean Anderson
  2022-03-10 20:50 ` [PATCH v2 01/28] doc: Convert semihosting readme to rST Sean Anderson
                   ` (28 more replies)
  0 siblings, 29 replies; 36+ messages in thread
From: Sean Anderson @ 2022-03-10 20:50 UTC (permalink / raw)
  To: Tom Rini
  Cc: Liviu Dudau, u-boot, Simon Glass, Linus Walleij, Andre Przywara,
	Sean Anderson, Mingkai Hu, Priyanka Jain, Rajesh Bhagat

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-28: 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).

This series depends on [1]. Patch 17 depends on [2].

[1] https://lore.kernel.org/u-boot/CACRpkdZ+9fmNjC_mvrbPa9-iuTQVd8UkJ7Zpe7cL0c5vZygsVw@mail.gmail.com/T/
[2] https://lore.kernel.org/u-boot/20220222183840.1355337-2-sean.anderson@seco.com/

Changes in v2:
- Document debug uart
- Make CONFIG_SPL_SEMIHOSTING depend on SPL
- Compile arch/arm/lib/semihosting.o in SPL
- Rebase on Andre's series
- Fix typos in commit message
- Fix baud numbers being off by 10
- Rename non-DM driver struct to match format of other drivers
- Add migration instructions for smhload
- Add semihosting fallback implementation
- Add implementation of puts for DM

Sean Anderson (28):
  doc: Convert semihosting readme to rST
  nxp: ls1046ardb: Convert README to rST
  doc: ls1046ardb: Expand boot mode section
  doc: ls1046ardb: Document debug uart
  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
  arm64: Save esr in pt_regs
  arm64: Save spsr in pt_regs
  arm64: Import some ESR and SPSR defines from Linux
  arm: smh: Add option to detect semihosting
  arm: Catch non-emulated semihosting calls
  serial: smh: Initialize serial only if semihosting is enabled
  arm64: ls1046a: Support semihosting fallback
  serial: dm: Add support for puts
  serial: sandbox: Implement puts
  serial: smh: Implement puts for DM

 MAINTAINERS                             |   5 +
 arch/arm/Kconfig                        |  47 +++-
 arch/arm/cpu/armv8/exceptions.S         |   9 +-
 arch/arm/cpu/armv8/fsl-layerscape/spl.c |   3 +
 arch/arm/include/asm/esr.h              | 343 ++++++++++++++++++++++++
 arch/arm/include/asm/proc-armv/ptrace.h |  75 ++++++
 arch/arm/include/asm/spl.h              |   1 +
 arch/arm/include/asm/u-boot-arm.h       |   7 +-
 arch/arm/lib/Makefile                   |   2 +-
 arch/arm/lib/interrupts_64.c            |  80 ++++--
 arch/arm/lib/semihosting.c              | 230 ++++++++--------
 arch/arm/mach-imx/imx8m/soc.c           |   4 +-
 board/freescale/ls1046ardb/MAINTAINERS  |   1 +
 board/freescale/ls1046ardb/README       |  76 ------
 board/freescale/ls1046ardb/ls1046ardb.c |  11 +
 cmd/fdt.c                               |   6 +-
 common/spl/Makefile                     |   1 +
 common/spl/spl_semihosting.c            |  71 +++++
 disk/part.c                             |   4 +-
 doc/README.semihosting                  |  38 ---
 doc/board/nxp/index.rst                 |   1 +
 doc/board/nxp/ls1046ardb.rst            | 191 +++++++++++++
 doc/usage/index.rst                     |   1 +
 doc/usage/semihosting.rst               |  73 +++++
 drivers/serial/Kconfig                  |  22 ++
 drivers/serial/Makefile                 |   1 +
 drivers/serial/sandbox.c                |  21 +-
 drivers/serial/serial-uclass.c          |  27 +-
 drivers/serial/serial.c                 |   2 +
 drivers/serial/serial_semihosting.c     | 168 ++++++++++++
 fs/Makefile                             |   1 +
 fs/fs.c                                 |  20 ++
 fs/semihostingfs.c                      | 115 ++++++++
 include/configs/ls1046ardb.h            |   2 +
 include/configs/vexpress_aemv8.h        |  10 +-
 include/fs.h                            |   1 +
 include/semihosting.h                   | 149 ++++++++++
 include/semihostingfs.h                 |  21 ++
 include/serial.h                        |  19 ++
 39 files changed, 1581 insertions(+), 278 deletions(-)
 create mode 100644 arch/arm/include/asm/esr.h
 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


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2022-03-12 18:00 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 20:50 [PATCH v2 00/28] arm: semihosting: Cleanups and new features Sean Anderson
2022-03-10 20:50 ` [PATCH v2 01/28] doc: Convert semihosting readme to rST Sean Anderson
2022-03-10 20:50 ` [PATCH v2 02/28] nxp: ls1046ardb: Convert README " Sean Anderson
2022-03-10 20:50 ` [PATCH v2 03/28] doc: ls1046ardb: Expand boot mode section Sean Anderson
2022-03-10 20:50 ` [PATCH v2 04/28] doc: ls1046ardb: Document debug uart Sean Anderson
2022-03-10 20:50 ` [PATCH v2 05/28] arm: smh: Add semihosting entry to MAINTAINERS Sean Anderson
2022-03-10 20:50 ` [PATCH v2 06/28] arm: smh: Export semihosting functions Sean Anderson
2022-03-10 20:50 ` [PATCH v2 07/28] arm: smh: Use numeric modes for smh_open Sean Anderson
2022-03-10 20:50 ` [PATCH v2 08/28] arm: smh: Return errno on error Sean Anderson
2022-03-10 20:50 ` [PATCH v2 09/28] arm: smh: Document functions in header Sean Anderson
2022-03-10 20:50 ` [PATCH v2 10/28] arm: smh: Add some file manipulation commands Sean Anderson
2022-03-10 20:50 ` [PATCH v2 11/28] spl: Add semihosting boot method Sean Anderson
2022-03-10 20:50 ` [PATCH v2 12/28] fs: Add semihosting filesystem Sean Anderson
2022-03-10 20:50 ` [PATCH v2 13/28] cmd: fdt: Use start/size for chosen instead of start/end Sean Anderson
2022-03-10 20:50 ` [PATCH v2 14/28] arm: smh: Remove smhload command Sean Anderson
2022-03-10 20:50 ` [PATCH v2 15/28] arm: smh: Add some functions for working with the host console Sean Anderson
2022-03-10 20:50 ` [PATCH v2 16/28] serial: Add semihosting driver Sean Anderson
2022-03-10 20:50 ` [PATCH v2 17/28] doc: smh: Update semihosting documentation Sean Anderson
2022-03-10 20:50 ` [PATCH v2 18/28] ls1046ardb: Add support for JTAG boot Sean Anderson
2022-03-10 20:50 ` [PATCH v2 19/28] arm64: Save esr in pt_regs Sean Anderson
2022-03-10 20:50 ` [PATCH v2 20/28] arm64: Save spsr " Sean Anderson
2022-03-10 21:01   ` Sean Anderson
2022-03-10 20:50 ` [PATCH v2 21/28] arm64: Import some ESR and SPSR defines from Linux Sean Anderson
2022-03-10 20:50 ` [PATCH v2 22/28] arm: smh: Add option to detect semihosting Sean Anderson
2022-03-10 20:50 ` [PATCH v2 23/28] arm: Catch non-emulated semihosting calls Sean Anderson
2022-03-10 20:50 ` [PATCH v2 24/28] serial: smh: Initialize serial only if semihosting is enabled Sean Anderson
2022-03-10 20:50 ` [PATCH v2 25/28] arm64: ls1046a: Support semihosting fallback Sean Anderson
2022-03-10 20:50 ` [PATCH v2 26/28] serial: dm: Add support for puts Sean Anderson
2022-03-11 15:40   ` Sean Anderson
2022-03-12  5:02   ` Simon Glass
2022-03-12  5:53     ` Sean Anderson
2022-03-12 17:58       ` Simon Glass
2022-03-10 20:50 ` [PATCH v2 27/28] serial: sandbox: Implement puts Sean Anderson
2022-03-10 20:50 ` [PATCH v2 28/28] serial: smh: Implement puts for DM Sean Anderson
2022-03-11 18:22 ` [PATCH v2 00/28] arm: semihosting: Cleanups and new features Andre Przywara
2022-03-11 19:20   ` Sean Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.