qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Thomas Huth" <thuth@redhat.com>,
	qemu-devel@nongnu.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Bin Meng" <bin.meng@windriver.com>
Cc: qemu-stable@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-riscv@nongnu.org, Weiwei Li <liweiwei@iscas.ac.cn>,
	Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
	Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
Subject: Re: [PATCH 1/2] hw/char/riscv_htif: Fix printing of console characters on big endian hosts
Date: Fri, 21 Jul 2023 15:26:52 +0200	[thread overview]
Message-ID: <2f6463df-fa50-6214-5b70-707fd84fb187@linaro.org> (raw)
In-Reply-To: <20230721094720.902454-2-thuth@redhat.com>

On 21/7/23 11:47, Thomas Huth wrote:
> The character that should be printed is stored in the 64 bit "payload"
> variable. The code currently tries to print it by taking the address
> of the variable and passing this pointer to qemu_chr_fe_write(). However,
> this only works on little endian hosts where the least significant bits
> are stored on the lowest address. To do this in a portable way, we have
> to store the value in an uint8_t variable instead.
> 
> Fixes: 5033606780 ("RISC-V HTIF Console")
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   hw/char/riscv_htif.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




  parent reply	other threads:[~2023-07-21 13:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21  9:47 [PATCH 0/2] riscv: Fix the console of the Spike machine on big endian hosts Thomas Huth
2023-07-21  9:47 ` [PATCH 1/2] hw/char/riscv_htif: Fix printing of console characters " Thomas Huth
2023-07-21 10:10   ` Bin Meng
2023-07-21 10:20   ` Daniel Henrique Barboza
2023-07-21 13:26   ` Philippe Mathieu-Daudé [this message]
2023-07-23 22:38   ` Alistair Francis
2023-07-21  9:47 ` [PATCH 2/2] hw/char/riscv_htif: Fix the console syscall " Thomas Huth
2023-07-21 10:10   ` Bin Meng
2023-07-21 10:20   ` Daniel Henrique Barboza
2023-07-23 22:37   ` Alistair Francis
2023-07-23 22:58 ` [PATCH 0/2] riscv: Fix the console of the Spike machine " Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f6463df-fa50-6214-5b70-707fd84fb187@linaro.org \
    --to=philmd@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=bin.meng@windriver.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=liweiwei@iscas.ac.cn \
    --cc=marcandre.lureau@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).