1 Star 0 Fork 126

ganqx/src-qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
acpi-cpu-Add-cpu_cppc-building-support.patch 2.96 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-04-10 20:59 . QEMU update to version 8.2.0-6:
From c75a0102a1bb00190b07b06ede8b1f9fa0bdaa3c Mon Sep 17 00:00:00 2001
From: Keqian Zhu <zhukeqian1@huawei.com>
Date: Tue, 2 Apr 2024 16:52:10 +0800
Subject: [PATCH] acpi/cpu: Add cpu_cppc building support
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
hw/acpi/cpu.c | 8 +++++++-
hw/i386/acpi-build.c | 2 +-
include/hw/acpi/cpu.h | 6 +++++-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index cf0c7e8538..c8c11e51c6 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -342,7 +342,9 @@ const VMStateDescription vmstate_cpu_hotplug = {
#define CPU_FW_EJECT_EVENT "CEJF"
void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
- build_madt_cpu_fn build_madt_cpu, hwaddr base_addr,
+ build_madt_cpu_fn build_madt_cpu,
+ build_cpu_cppc_fn build_cpu_cppc,
+ hwaddr base_addr,
const char *res_root,
const char *event_handler_method,
AmlRegionSpace rs)
@@ -668,6 +670,10 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
aml_append(dev, aml_name_decl("_UID", uid));
}
+ if (build_cpu_cppc) {
+ build_cpu_cppc(i, arch_ids->len, dev);
+ }
+
method = aml_method("_STA", 0, AML_SERIALIZED);
aml_append(method, aml_return(aml_call1(CPU_STS_METHOD, uid)));
aml_append(dev, method);
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index db4ca8a66a..e10799ecc6 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1545,7 +1545,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
.smi_path = pm->smi_on_cpuhp ? "\\_SB.PCI0.SMI0.SMIC" : NULL,
.fw_unplugs_cpu = pm->smi_on_cpu_unplug,
};
- build_cpus_aml(dsdt, machine, opts, pc_madt_cpu_entry,
+ build_cpus_aml(dsdt, machine, opts, pc_madt_cpu_entry, NULL,
pm->cpu_hp_io_base, "\\_SB.PCI0", "\\_GPE._E02",
AML_SYSTEM_IO);
}
diff --git a/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h
index 76bc7eb251..b31a2e50d9 100644
--- a/include/hw/acpi/cpu.h
+++ b/include/hw/acpi/cpu.h
@@ -59,8 +59,12 @@ typedef struct CPUHotplugFeatures {
typedef void (*build_madt_cpu_fn)(int uid, const CPUArchIdList *apic_ids,
GArray *entry, bool force_enabled);
+typedef void (*build_cpu_cppc_fn)(int uid, int num_cpu, Aml *dev);
+
void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
- build_madt_cpu_fn build_madt_cpu, hwaddr base_addr,
+ build_madt_cpu_fn build_madt_cpu,
+ build_cpu_cppc_fn build_cpu_cppc,
+ hwaddr base_addr,
const char *res_root,
const char *event_handler_method,
AmlRegionSpace rs);
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ganqx/src-qemu.git
git@gitee.com:ganqx/src-qemu.git
ganqx
src-qemu
src-qemu
master

搜索帮助