1 Star 0 Fork 123

roy/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hw-loongarch-virt-Fix-FDT-memory-node-address-width.patch 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-09-18 15:20 . QEMU update to version 8.2.0-18:
From b9e94d97025251cfd13b3ad859b97002504285ce Mon Sep 17 00:00:00 2001
From: Gao Jiazhen <gaojiazhen_yewu@cmss.chinamobile.com>
Date: Fri, 13 Sep 2024 18:57:20 +0800
Subject: [PATCH] hw/loongarch/virt: Fix FDT memory node address width
cherry picked from commitd 6204af704a071ea68d3af55c0502b112a7af9546
Higher bits for memory nodes were omitted at qemu_fdt_setprop_cells.
Cc: mailto: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
Signed-off-by: Gao Jiazhen gaojiazhen_yewu@cmss.chinamobile.com
---
hw/loongarch/virt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index fc7b70ed4e..5d4fcb7a55 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -360,7 +360,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) {
--
2.41.0.windows.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/roygiteee/qemu.git
git@gitee.com:roygiteee/qemu.git
roygiteee
qemu
qemu
master

搜索帮助