qemu/hw/mips
Philippe Mathieu-Daudé 145e2198d7 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>
2023-01-13 09:31:19 +01:00
..
bootloader.c hw/mips/bootloader: Allow bl_gen_jump_kernel to optionally set register 2022-10-31 11:32:45 +01:00
boston.c hw/mips/bootloader: Allow bl_gen_jump_kernel to optionally set register 2022-10-31 11:32:45 +01:00
cps.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
fuloong2e.c hw/mips/bootloader: Allow bl_gen_jump_kernel to optionally set register 2022-10-31 11:32:45 +01:00
fw_cfg.c hw/mips: Implement fw_cfg_arch_key_name() 2021-01-04 23:32:27 +01:00
fw_cfg.h hw/mips: Implement fw_cfg_arch_key_name() 2021-01-04 23:32:27 +01:00
gt64xxx_pci.c hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps 2023-01-13 09:31:19 +01:00
jazz.c pckbd: remove legacy i8042_mm_init() function 2022-07-18 19:28:46 +01:00
Kconfig hw/display: Rename VGA_ISA_MM -> VGA_MMIO 2022-01-13 10:58:54 +01:00
loongson3_bootp.c hw/mips: Add Loongson-3 boot parameter helpers 2021-01-04 23:33:38 +01:00
loongson3_bootp.h hw/mips: loongson3: Drop 'struct MemmapEntry' 2021-02-21 14:22:09 +01:00
loongson3_virt.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
malta.c hw/mips/malta: Trace FPGA LEDs/ASCII display updates 2023-01-13 09:31:19 +01:00
meson.build hw/mips: Restrict non-virtualized machines to TCG 2021-05-02 16:49:35 +02:00
mips_int.c hw/mips: Use QEMU_IOTHREAD_LOCK_GUARD in cpu_mips_irq_request 2023-01-04 16:20:01 -08:00
mipssim.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
trace-events hw/mips/malta: Trace FPGA LEDs/ASCII display updates 2023-01-13 09:31:19 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00