diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-01-04 10:03:14 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-01-13 09:31:19 +0100 |
| commit | 145e2198d749ec09a405f1607a9932499b76f1eb (patch) | |
| tree | ab5a7c15c802b7bc1b8a7fee7f080235e532cb1e /scripts/qapi/source.py | |
| parent | 65423e6efeac1ee1057870361337c572c941140c (diff) | |
| download | focaccia-qemu-145e2198d749ec09a405f1607a9932499b76f1eb.tar.gz focaccia-qemu-145e2198d749ec09a405f1607a9932499b76f1eb.zip | |
hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps
GT64120's PCI endianness swapping works on little-endian hosts, but doesn't on big-endian ones. Instead of complicating how CFGADDR/CFGDATA registers deal with endianness, use the existing MemoryRegionOps from hw/pci/pci_host.c. Doing so also reduce the access to internal PCI_HOST_BRIDGE fields. Map the PCI_HOST_BRIDGE MemoryRegionOps into the corresponding CFGADDR/CFGDATA regions in the ISD MMIO and remove the unused code in the current ISD read/write handlers. Update the mapping when PCI0_CMD register is accessed (in case the endianness is changed). This allows using the GT64120 on a big-endian host (and boot the MIPS Malta machine in little-endian). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230104133935.4639-6-philmd@linaro.org>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions