qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] PING for-1.6 Re: [PATCH for-1.6] fw_cfg: the I/O port varia


From: Paolo Bonzini
Subject: [Qemu-devel] PING for-1.6 Re: [PATCH for-1.6] fw_cfg: the I/O port variant expects little-endian
Date: Mon, 05 Aug 2013 18:21:28 +0200
User-agent: Mozilla/5.0 (X11; Linux ppc; rv:17.0) Gecko/20130704 Icedove/17.0.7

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 <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
  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.



reply via email to

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