From: Joel Stanley Date: Wed, 4 Jun 2025 02:54:39 +0000 (+0930) Subject: hw/riscv/virt: Use setprop_sized_cells for memory X-Git-Tag: v10.1.0-rc0~31^2~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=349500bfb8523c94f88da4bfc41a22ccbba19055;p=thirdparty%2Fqemu.git hw/riscv/virt: Use setprop_sized_cells for memory Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Signed-off-by: Joel Stanley Message-ID: <20250604025450.85327-4-joel@jms.id.au> Signed-off-by: Alistair Francis --- diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 5143a465555..e074a296751 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -311,8 +311,7 @@ static void create_fdt_socket_memory(RISCVVirtState *s, int socket) size = riscv_socket_mem_size(ms, socket); mem_name = g_strdup_printf("/memory@%"HWADDR_PRIx, addr); qemu_fdt_add_subnode(ms->fdt, mem_name); - qemu_fdt_setprop_cells(ms->fdt, mem_name, "reg", - addr >> 32, addr, size >> 32, size); + qemu_fdt_setprop_sized_cells(ms->fdt, mem_name, "reg", 2, addr, 2, size); qemu_fdt_setprop_string(ms->fdt, mem_name, "device_type", "memory"); riscv_socket_fdt_write_id(ms, mem_name, socket); }