diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2024-05-20 22:06:31 +0100 |
---|---|---|
committer | Song Gao <gaosong@loongson.cn> | 2024-05-23 09:30:41 +0800 |
commit | 6204af704a071ea68d3af55c0502b112a7af9546 (patch) | |
tree | 31c7d6f6d9c783fda57b3877da93788c41100d25 | |
parent | f83434f3dc6df21c890ff1537c47905eedf1d69c (diff) | |
download | qemu-6204af704a071ea68d3af55c0502b112a7af9546.zip qemu-6204af704a071ea68d3af55c0502b112a7af9546.tar.gz qemu-6204af704a071ea68d3af55c0502b112a7af9546.tar.bz2 |
hw/loongarch/virt: Fix FDT memory node address width
Higher bits for memory nodes were omitted at qemu_fdt_setprop_cells.
Cc: qemu-stable@nongnu.org
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20240520-loongarch-fdt-memnode-v1-1-5ea9be93911e@flygoat.com>
Signed-off-by: Song Gao <gaosong@loongson.cn>
-rw-r--r-- | hw/loongarch/virt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index e3bdf08..3e6e93e 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -464,7 +464,8 @@ static void fdt_add_memory_node(MachineState *ms, char *nodename = g_strdup_printf("/memory@%" PRIx64, base); qemu_fdt_add_subnode(ms->fdt, nodename); - qemu_fdt_setprop_cells(ms->fdt, nodename, "reg", 0, base, 0, size); + qemu_fdt_setprop_cells(ms->fdt, nodename, "reg", base >> 32, base, + size >> 32, size); qemu_fdt_setprop_string(ms->fdt, nodename, "device_type", "memory"); if (ms->numa_state && ms->numa_state->num_nodes) { |