qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH v7 04/10] hw/timer/xilinx_timer: Make device endianness confi


From: Thomas Huth
Subject: Re: [PATCH v7 04/10] hw/timer/xilinx_timer: Make device endianness configurable
Date: Wed, 12 Feb 2025 14:04:30 +0100
User-agent: Mozilla Thunderbird

On 12/02/2025 13.36, Philippe Mathieu-Daudé wrote:
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
Add the "little-endian" property to select the device
endianness, defaulting to little endian.
Set the proper endianness for each machine using the device.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  hw/microblaze/petalogix_ml605_mmu.c      |  1 +
  hw/microblaze/petalogix_s3adsp1800_mmu.c |  1 +
  hw/ppc/virtex_ml507.c                    |  1 +
  hw/riscv/microblaze-v-generic.c          |  2 ++
  hw/timer/xilinx_timer.c                  | 43 +++++++++++++++++-------
  5 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/hw/microblaze/petalogix_ml605_mmu.c 
b/hw/microblaze/petalogix_ml605_mmu.c
index 55398cc67d1..490640e9428 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -127,6 +127,7 @@ petalogix_ml605_init(MachineState *machine)
/* 2 timers at irq 2 @ 100 Mhz. */
      dev = qdev_new("xlnx.xps-timer");
+    qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE);
      qdev_prop_set_uint32(dev, "one-timer-only", 0);
      qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000);
      sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);

Same question as in the second patch: Do we still need to take care of TARGET_BIG_ENDIAN here?

Anyway,
Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

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