From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6NXS-0000y9-BT for qemu-devel@nongnu.org; Mon, 05 Aug 2013 12:21:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6NXJ-0001AR-7p for qemu-devel@nongnu.org; Mon, 05 Aug 2013 12:21:42 -0400 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:52855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6NXJ-0001AN-2M for qemu-devel@nongnu.org; Mon, 05 Aug 2013 12:21:33 -0400 Received: by mail-wg0-f42.google.com with SMTP id j13so1564118wgh.3 for ; Mon, 05 Aug 2013 09:21:32 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51FFD108.7030107@redhat.com> Date: Mon, 05 Aug 2013 18:21:28 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1375014954-31916-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1375014954-31916-2-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] PING for-1.6 Re: [PATCH for-1.6] fw_cfg: the I/O port variant expects little-endian List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , qemu-devel@nongnu.org On 07/28/2013 02:35 PM, 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 > Signed-off-by: Paolo Bonzini > --- > 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, > }; > > Ping.