[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0
From: |
Luc Michel |
Subject: |
Re: [PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0 |
Date: |
Mon, 27 Jun 2022 10:42:11 +0200 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On 13:45 Tue 07 Jun , Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Luc Michel <lmichel@kalray.eu>
> ---
> 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 dea5b2de8d..21b6bc3a0f 100644
> --- a/semihosting/arm-compat-semi.c
> +++ b/semihosting/arm-compat-semi.c
> @@ -436,8 +436,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
>
>
>
>
> To declare a filtering error, please use the following link :
> https://www.security-mail.net/reporter.php?mid=c4ea.629fd73d.b3ca0.0&r=lmichel%40kalrayinc.com&s=qemu-devel-bounces%2Blmichel%3Dkalrayinc.com%40nongnu.org&o=%5BPATCH+v4+51%2F53%5D+semihosting%3A+Use+console_out_gf+for+SYS_WRITE0&verdict=C&c=a15d92901bee73eeb1fb2b2232be37c9cb5356be
>
--
- [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration, (continued)
- [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration, Richard Henderson, 2022/06/07
- [PATCH v4 49/53] semihosting: Use console_out_gf for SYS_WRITEC, Richard Henderson, 2022/06/07
- [PATCH v4 46/53] semihosting: Add GuestFDConsole, Richard Henderson, 2022/06/07
- [PATCH v4 43/53] semihosting: Expand qemu_semihosting_console_inc to read, Richard Henderson, 2022/06/07
- [PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0, Richard Henderson, 2022/06/07
- Re: [PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0,
Luc Michel <=
- [PATCH v4 50/53] semihosting: Remove qemu_semihosting_console_outc, Richard Henderson, 2022/06/07
- [PATCH v4 52/53] semihosting: Remove qemu_semihosting_console_outs, Richard Henderson, 2022/06/07
- [PATCH v4 53/53] semihosting: Create semihost_sys_poll_one, Richard Henderson, 2022/06/07
- [PATCH v4 44/53] semihosting: Cleanup chardev init, Richard Henderson, 2022/06/07