[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 7dc176: hw/pci-host/prep: Don't reverse IO ac
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 7dc176: hw/pci-host/prep: Don't reverse IO accesses on big... |
Date: |
Tue, 08 Apr 2014 11:00:04 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 7dc176bce49c61551b513508def136d5bb632b72
https://github.com/qemu/qemu/commit/7dc176bce49c61551b513508def136d5bb632b72
Author: Peter Maydell <address@hidden>
Date: 2014-04-08 (Tue, 08 Apr 2014)
Changed paths:
M hw/pci-host/prep.c
Log Message:
-----------
hw/pci-host/prep: Don't reverse IO accesses on bigendian hosts
The raven_io_read() and raven_io_write() functions pass and
return values in little-endian format (since the IO op struct
is marked DEVICE_LITTLE_ENDIAN); however they were storing the
values in the buffer to pass to address_space_read/write()
in host-endian order, which meant that on big-endian hosts
the values were inadvertently reversed. Use the *_le_p()
accessors instead so that we are consistent regardless of
host endianness.
Strictly speaking the byte order of the buffer for
address_space_rw() is target byte order (which for PPC
will be BE) but it doesn't actually matter as long as we
are consistent about the marking on the IO op struct and
which stl_*_p().
This bug was probably introduced due to confusion caused by
the two different versions of ldl_p() and friends:
bswap.h defines versions meaning "host endianness access"
cpu-all.h defines versions meaning "target endianness access"
As a target-independent source file prep.c gets the bswap.h
versions; the very similar looking code in ioport.c is
compiled per-target and gets the cpu-all.h versions.
Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden
Reviewed-by: Richard Henderson <address@hidden>
Commit: efcc87d9aedb590b8506cd1a7c8abe557c760f9e
https://github.com/qemu/qemu/commit/efcc87d9aedb590b8506cd1a7c8abe557c760f9e
Author: Peter Maydell <address@hidden>
Date: 2014-04-08 (Tue, 08 Apr 2014)
Changed paths:
M VERSION
Log Message:
-----------
Update version for v2.0.0-rc2 release
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/9bc1a1d81767...efcc87d9aedb
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 7dc176: hw/pci-host/prep: Don't reverse IO accesses on big...,
GitHub <=