aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2024-05-20 22:06:31 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2024-05-27 07:50:35 +0300
commit085446905000d6b80978815594a7cd34d54ff46b (patch)
treefb500d6d561e0017f8c89cccc421e23d02066882 /hw
parent16b1ecee52effa3346fb34dcc351e4645e4ab53e (diff)
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> (cherry picked from commit 6204af704a071ea68d3af55c0502b112a7af9546) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw')
-rw-r--r--hw/loongarch/virt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 8f39254880..83d3d7522f 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -333,7 +333,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) {