[PATCH 0/6] hw/mips/gt64xxx_pci: Fix endianness swap on big-endian hosts

Philippe Mathieu-Daudé posted 6 patches 1 year, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230104133935.4639-1-philmd@linaro.org
Maintainers: "Philippe Mathieu-Daudé" <philmd@linaro.org>, Aurelien Jarno <aurelien@aurel32.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Cleber Rosa <crosa@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>
hw/mips/gt64xxx_pci.c               | 78 +++++++++++++++++++++--------
hw/mips/malta.c                     | 16 ++++--
hw/mips/trace-events                |  4 ++
hw/pci/pci_host.c                   |  6 +++
tests/avocado/machine_mips_malta.py | 52 +++++++++++++++++--
5 files changed, 127 insertions(+), 29 deletions(-)
[PATCH 0/6] hw/mips/gt64xxx_pci: Fix endianness swap on big-endian hosts
Posted by Philippe Mathieu-Daudé 1 year, 3 months ago
While working on endianness consolidation I figured
a long-standing bug in the GT64120 while accessing
PCI config/data registers from the CPU bus (via the
ISD).
While the debugging was painful, the fix is quite
easy: simply use the endianness MemoryRegionOps
provided by the abstract PCI_HOST_BRIDGE class.

Patches 1-3 were useful while debugging.
patch 5 is the fix and patch 6 add a test to keep
testing on BE hosts.

Philippe Mathieu-Daudé (6):
  hw/pci/pci_host: Trace config accesses on unexisting functions
  hw/mips/malta: Split FPGA LEDs/ASCII display updates
  hw/mips/malta: Trace FPGA LEDs/ASCII display updates
  hw/mips/gt64xxx_pci: Accumulate address space changes
  hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps
  tests/avocado: Add tests booting YAMON ROM on MIPS Malta machines

 hw/mips/gt64xxx_pci.c               | 78 +++++++++++++++++++++--------
 hw/mips/malta.c                     | 16 ++++--
 hw/mips/trace-events                |  4 ++
 hw/pci/pci_host.c                   |  6 +++
 tests/avocado/machine_mips_malta.py | 52 +++++++++++++++++--
 5 files changed, 127 insertions(+), 29 deletions(-)

-- 
2.38.1


Re: [PATCH 0/6] hw/mips/gt64xxx_pci: Fix endianness swap on big-endian hosts
Posted by Richard Henderson 1 year, 3 months ago
On 1/4/23 05:39, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (6):
>    hw/pci/pci_host: Trace config accesses on unexisting functions
>    hw/mips/malta: Split FPGA LEDs/ASCII display updates
>    hw/mips/malta: Trace FPGA LEDs/ASCII display updates
>    hw/mips/gt64xxx_pci: Accumulate address space changes
>    hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps
>    tests/avocado: Add tests booting YAMON ROM on MIPS Malta machines

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

Re: [PATCH 0/6] hw/mips/gt64xxx_pci: Fix endianness swap on big-endian hosts
Posted by Philippe Mathieu-Daudé 1 year, 3 months ago
On 4/1/23 14:39, Philippe Mathieu-Daudé wrote:

> Philippe Mathieu-Daudé (6):
>    hw/pci/pci_host: Trace config accesses on unexisting functions
>    hw/mips/malta: Split FPGA LEDs/ASCII display updates
>    hw/mips/malta: Trace FPGA LEDs/ASCII display updates
>    hw/mips/gt64xxx_pci: Accumulate address space changes
>    hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps
>    tests/avocado: Add tests booting YAMON ROM on MIPS Malta machines

Applied to mips-next.