[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 51/60] semihosting: Use console_out_gf for SYS_WRITE0
From: |
Richard Henderson |
Subject: |
[PULL 51/60] semihosting: Use console_out_gf for SYS_WRITE0 |
Date: |
Tue, 28 Jun 2022 10:23:54 +0530 |
Reviewed-by: Luc Michel <lmichel@kalray.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
semihosting/arm-compat-semi.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
index d61b773f98..1a1e2a6960 100644
--- a/semihosting/arm-compat-semi.c
+++ b/semihosting/arm-compat-semi.c
@@ -437,8 +437,15 @@ void do_common_semihosting(CPUState *cs)
break;
case TARGET_SYS_WRITE0:
- ret = qemu_semihosting_console_outs(env, args);
- common_semi_set_ret(cs, ret);
+ {
+ ssize_t len = target_strlen(args);
+ if (len < 0) {
+ common_semi_dead_cb(cs, -1, EFAULT);
+ } else {
+ semihost_sys_write_gf(cs, common_semi_dead_cb,
+ &console_out_gf, args, len);
+ }
+ }
break;
case TARGET_SYS_WRITE:
--
2.34.1
- [PULL 42/60] semihosting: Pass CPUState to qemu_semihosting_console_inc, (continued)
- [PULL 42/60] semihosting: Pass CPUState to qemu_semihosting_console_inc, Richard Henderson, 2022/06/28
- [PULL 44/60] semihosting: Cleanup chardev init, Richard Henderson, 2022/06/28
- [PULL 45/60] semihosting: Create qemu_semihosting_console_write, Richard Henderson, 2022/06/28
- [PULL 46/60] semihosting: Add GuestFDConsole, Richard Henderson, 2022/06/28
- [PULL 52/60] semihosting: Remove qemu_semihosting_console_outs, Richard Henderson, 2022/06/28
- [PULL 53/60] semihosting: Create semihost_sys_poll_one, Richard Henderson, 2022/06/28
- [PULL 48/60] semihosting: Use console_in_gf for SYS_READC, Richard Henderson, 2022/06/28
- [PULL 47/60] semihosting: Create qemu_semihosting_guestfd_init, Richard Henderson, 2022/06/28
- [PULL 49/60] semihosting: Use console_out_gf for SYS_WRITEC, Richard Henderson, 2022/06/28
- [PULL 50/60] semihosting: Remove qemu_semihosting_console_outc, Richard Henderson, 2022/06/28
- [PULL 51/60] semihosting: Use console_out_gf for SYS_WRITE0,
Richard Henderson <=
- [PULL 43/60] semihosting: Expand qemu_semihosting_console_inc to read, Richard Henderson, 2022/06/28
- [PULL 54/60] target/m68k: Eliminate m68k_semi_is_fseek, Richard Henderson, 2022/06/28
- [PULL 55/60] target/m68k: Make semihosting system only, Richard Henderson, 2022/06/28
- [PULL 56/60] target/mips: Use an exception for semihosting, Richard Henderson, 2022/06/28
- [PULL 59/60] target/nios2: Eliminate nios2_semi_is_lseek, Richard Henderson, 2022/06/28
- [PULL 60/60] target/nios2: Move nios2-semi.c to nios2_softmmu_ss, Richard Henderson, 2022/06/28
- [PULL 57/60] target/mips: Add UHI errno values, Richard Henderson, 2022/06/28
- [PULL 58/60] target/mips: Drop pread and pwrite syscalls from semihosting, Richard Henderson, 2022/06/28
- Re: [PULL 00/60] semihosting patch queue, Richard Henderson, 2022/06/28