qemu-devel
[Top][All Lists]
Advanced

[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
> 

-- 







reply via email to

[Prev in Thread] Current Thread [Next in Thread]