From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-1.6] fw_cfg: the I/O port variant expects little-endian
Date: Mon, 29 Jul 2013 12:44:12 +0100 [thread overview]
Message-ID: <51F6558C.4030405@ilande.co.uk> (raw)
In-Reply-To: <1375014954-31916-2-git-send-email-pbonzini@redhat.com>
On 28/07/13 13:35, Paolo Bonzini wrote:
> The I/O port variant of fw_cfg is used by sparc64, which is a big-endian machine.
> Firmware swaps bytes before sending them to fw_cfg, so we need to unswap them in
> the device.
>
> This is only used on sparc64 and on (little-endian) x86, so it does not affect
> any other target. 32-bit Sparc and PPC all use memory-mapped fw_cfg.
>
> Reported-by: Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
> hw/nvram/fw_cfg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> index 0a35015..d0820e5 100644
> --- a/hw/nvram/fw_cfg.c
> +++ b/hw/nvram/fw_cfg.c
> @@ -324,7 +324,7 @@ static const MemoryRegionOps fw_cfg_data_mem_ops = {
> static const MemoryRegionOps fw_cfg_comb_mem_ops = {
> .read = fw_cfg_comb_read,
> .write = fw_cfg_comb_write,
> - .endianness = DEVICE_NATIVE_ENDIAN,
> + .endianness = DEVICE_LITTLE_ENDIAN,
> .valid.accepts = fw_cfg_comb_valid,
> };
Hi Paolo,
I can confirm that this fixes SPARC64 boot for me - thanks!
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
next prev parent reply other threads:[~2013-07-29 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-28 12:35 [Qemu-devel] [PATCH for-1.6] fw_cfg: the I/O port variant expects little-endian Paolo Bonzini
2013-07-29 11:44 ` Mark Cave-Ayland [this message]
2013-08-05 16:21 ` [Qemu-devel] PING for-1.6 " Paolo Bonzini
2013-08-05 17:19 ` Laszlo Ersek
2013-08-14 16:29 ` [Qemu-devel] " Anthony Liguori
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=51F6558C.4030405@ilande.co.uk \
--to=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.