代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/qemu 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 11498c2d92e703923d373b64ad3f33aec5f383f2 Mon Sep 17 00:00:00 2001
From: Jiajie Li <lijiajie11@huawei.com>
Date: Thu, 17 Feb 2022 09:51:13 +0800
Subject: [PATCH] i386/cpu: fix compile error in all target configure
When compile with `./configure && make -j`, there will be
error: "unknown type name `ram_addr_t`", fix the error by
adding compilation macro to control it.
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
---
target/i386/cpu.c | 16 ++++++++--------
target/i386/cpu.h | 2 ++
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index a4732a7372..d9dca1dafb 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6711,14 +6711,6 @@ static bool x86_cpu_get_paging_enabled(const CPUState *cs)
return cpu->env.cr[0] & CR0_PG_MASK;
}
-#endif /* !CONFIG_USER_ONLY */
-
-static void x86_cpu_set_pc(CPUState *cs, vaddr value)
-{
- X86CPU *cpu = X86_CPU(cs);
-
- cpu->env.eip = value;
-}
/* At present, we check the vm is *LARGE* or not, i.e. whether
* the memory size is more than 4T or not.
@@ -6736,6 +6728,14 @@ void x86_cpu_adjuest_by_ram_size(ram_addr_t ram_size, X86CPU *cpu)
cpu->fill_mtrr_mask = true;
}
}
+#endif /* !CONFIG_USER_ONLY */
+
+static void x86_cpu_set_pc(CPUState *cs, vaddr value)
+{
+ X86CPU *cpu = X86_CPU(cs);
+
+ cpu->env.eip = value;
+}
int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request)
{
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 6f777fd6ca..d9296a9abc 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1842,10 +1842,12 @@ struct X86CPU {
extern const VMStateDescription vmstate_x86_cpu;
#endif
+#ifndef CONFIG_USER_ONLY
#define DEFAULT_VM_CPU_PHYS_BITS 42
#define LARGE_VM_CPU_PHYS_BITS 46
void x86_cpu_adjuest_by_ram_size(ram_addr_t ram_size, X86CPU *cpu);
+#endif
int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request);
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。