aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv/microblaze-v-generic.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-09-25 23:15:04 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-02-16 14:34:09 +0100
commit2cdf693b197db6c6c27ff2bf02fce1c0bb384786 (patch)
treec504fd64a67cdbd0c3c01f825389d7bcd311dfc1 /hw/riscv/microblaze-v-generic.c
parent4ec96630f93ec2a1fd8bf9c9150cdae330531de8 (diff)
downloadqemu-2cdf693b197db6c6c27ff2bf02fce1c0bb384786.zip
qemu-2cdf693b197db6c6c27ff2bf02fce1c0bb384786.tar.gz
qemu-2cdf693b197db6c6c27ff2bf02fce1c0bb384786.tar.bz2
hw/intc/xilinx_intc: Make device endianness configurable
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "endianness" property to select the device endianness. This property is unspecified by default, and machines need to set it explicitly. Set the proper endianness for each machine using the device. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250213122217.62654-3-philmd@linaro.org>
Diffstat (limited to 'hw/riscv/microblaze-v-generic.c')
-rw-r--r--hw/riscv/microblaze-v-generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/riscv/microblaze-v-generic.c b/hw/riscv/microblaze-v-generic.c
index 26788a1..ebdd461 100644
--- a/hw/riscv/microblaze-v-generic.c
+++ b/hw/riscv/microblaze-v-generic.c
@@ -79,6 +79,7 @@ static void mb_v_generic_init(MachineState *machine)
memory_region_add_subregion(sysmem, ddr_base, phys_ram);
dev = qdev_new("xlnx.xps-intc");
+ qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE);
qdev_prop_set_uint32(dev, "kind-of-intr",
1 << UARTLITE_IRQ);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);