[PATCH v1 0/4] semihosting read console support

Alex Bennée posted 4 patches 4 years, 4 months ago
Test asan failed
Test checkpatch failed
Test FreeBSD failed
Test docker-mingw@fedora failed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191218180029.6744-1-alex.bennee@linaro.org
There is a newer version of this series
include/hw/semihosting/console.h          | 16 +++++
include/hw/semihosting/semihost.h         |  4 ++
hw/semihosting/console.c                  | 78 +++++++++++++++++++++++
linux-user/aarch64/cpu_loop.c             |  1 +
linux-user/arm/cpu_loop.c                 |  1 +
linux-user/arm/semihost.c                 | 23 +++++++
stubs/semihost.c                          |  4 ++
target/arm/arm-semi.c                     |  3 +-
target/arm/helper.c                       |  8 +--
target/arm/m_helper.c                     |  1 +
target/arm/translate-a64.c                |  2 +-
target/arm/translate.c                    |  6 +-
tests/tcg/aarch64/system/semiconsole.c    | 36 +++++++++++
vl.c                                      |  3 +
tests/tcg/aarch64/Makefile.softmmu-target |  9 ++-
15 files changed, 182 insertions(+), 13 deletions(-)
create mode 100644 tests/tcg/aarch64/system/semiconsole.c
[PATCH v1 0/4] semihosting read console support
Posted by Alex Bennée 4 years, 4 months ago
Hi,

This series introduces a new "blocking" console read function for
semihosting and plumbs it in to the ARM semihosting code. The main bit
of work is Keith's patch (with a few tweaks by me). The other
preparatory patches make sure the PC is updated after semihosting
succeeds and a little bit of clean-up.

The following patches need review
   01 - target arm remove unused EXCP_SEMIHOST leg
   02 - target arm only update pc after semihosting compl
   04 - tests tcg add a dumb as bricks semihosting consol

Alex Bennée (3):
  target/arm: remove unused EXCP_SEMIHOST leg
  target/arm: only update pc after semihosting completes
  tests/tcg: add a dumb-as-bricks semihosting console test

Keith Packard (1):
  semihosting: add qemu_semihosting_console_inc for SYS_READC

 include/hw/semihosting/console.h          | 16 +++++
 include/hw/semihosting/semihost.h         |  4 ++
 hw/semihosting/console.c                  | 78 +++++++++++++++++++++++
 linux-user/aarch64/cpu_loop.c             |  1 +
 linux-user/arm/cpu_loop.c                 |  1 +
 linux-user/arm/semihost.c                 | 23 +++++++
 stubs/semihost.c                          |  4 ++
 target/arm/arm-semi.c                     |  3 +-
 target/arm/helper.c                       |  8 +--
 target/arm/m_helper.c                     |  1 +
 target/arm/translate-a64.c                |  2 +-
 target/arm/translate.c                    |  6 +-
 tests/tcg/aarch64/system/semiconsole.c    | 36 +++++++++++
 vl.c                                      |  3 +
 tests/tcg/aarch64/Makefile.softmmu-target |  9 ++-
 15 files changed, 182 insertions(+), 13 deletions(-)
 create mode 100644 tests/tcg/aarch64/system/semiconsole.c

-- 
2.20.1


Re: [PATCH v1 0/4] semihosting read console support
Posted by Keith Packard 4 years, 4 months ago
Alex Bennée <alex.bennee@linaro.org> writes:

> Hi,
>
> This series introduces a new "blocking" console read function for
> semihosting and plumbs it in to the ARM semihosting code. The main bit
> of work is Keith's patch (with a few tweaks by me). The other
> preparatory patches make sure the PC is updated after semihosting
> succeeds and a little bit of clean-up.
>
> The following patches need review
>    01 - target arm remove unused EXCP_SEMIHOST leg
>    02 - target arm only update pc after semihosting compl
>    04 - tests tcg add a dumb as bricks semihosting consol

I've reviewed all four of these patches to the best of my (limited)
ability. I've also tested this with picolibc's semihosting support for
cortex-m3

Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Keith Packard <keithp@keithp.com>

Thanks much for the rework, definitely beyond my understanding of QEMU
internals.

-- 
-keith