qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH-for-8.0 5/7] hw/mips/malta: Explicit GT64120 endianness upon


From: Richard Henderson
Subject: Re: [PATCH-for-8.0 5/7] hw/mips/malta: Explicit GT64120 endianness upon device creation
Date: Mon, 19 Dec 2022 16:52:47 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 12/9/22 07:15, Philippe Mathieu-Daudé wrote:
Propagate the controller endianess from the machine, setting
the "cpu-little-endian" property.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  hw/mips/malta.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

Modulo using qdev_prop_set_bool,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index ba92022f87..1f4e0c7acc 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1390,7 +1390,9 @@ void mips_malta_init(MachineState *machine)
      stl_p(memory_region_get_ram_ptr(bios_copy) + 0x10, 0x00000420);
/* Northbridge */
-    dev = sysbus_create_simple("gt64120", -1, NULL);
+    dev = qdev_new("gt64120");
+    qdev_prop_set_bit(dev, "cpu-little-endian", !be);
+    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
      pci_bus = PCI_BUS(qdev_get_child_bus(dev, "pci"));
/* Southbridge */




reply via email to

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