|
@@ -338,7 +338,7 @@ const VMStateDescription vmstate_cpu_hotplug = {
|
|
#define CPU_FW_EJECT_EVENT "CEJF"
|
|
#define CPU_FW_EJECT_EVENT "CEJF"
|
|
|
|
|
|
void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
|
|
void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
|
|
- hwaddr io_base,
|
|
|
|
|
|
+ build_madt_cpu_fn build_madt_cpu, hwaddr io_base,
|
|
const char *res_root,
|
|
const char *res_root,
|
|
const char *event_handler_method)
|
|
const char *event_handler_method)
|
|
{
|
|
{
|
|
@@ -353,8 +353,6 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
|
|
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
|
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
|
const CPUArchIdList *arch_ids = mc->possible_cpu_arch_ids(machine);
|
|
const CPUArchIdList *arch_ids = mc->possible_cpu_arch_ids(machine);
|
|
char *cphp_res_path = g_strdup_printf("%s." CPUHP_RES_DEVICE, res_root);
|
|
char *cphp_res_path = g_strdup_printf("%s." CPUHP_RES_DEVICE, res_root);
|
|
- Object *obj = object_resolve_path_type("", TYPE_ACPI_DEVICE_IF, NULL);
|
|
|
|
- AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(obj);
|
|
|
|
|
|
|
|
cpu_ctrl_dev = aml_device("%s", cphp_res_path);
|
|
cpu_ctrl_dev = aml_device("%s", cphp_res_path);
|
|
{
|
|
{
|
|
@@ -664,9 +662,7 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
|
|
aml_append(dev, method);
|
|
aml_append(dev, method);
|
|
|
|
|
|
/* build _MAT object */
|
|
/* build _MAT object */
|
|
- assert(adevc && adevc->madt_cpu);
|
|
|
|
- adevc->madt_cpu(i, arch_ids, madt_buf,
|
|
|
|
- true); /* set enabled flag */
|
|
|
|
|
|
+ build_madt_cpu(i, arch_ids, madt_buf, true); /* set enabled flag */
|
|
aml_append(dev, aml_name_decl("_MAT",
|
|
aml_append(dev, aml_name_decl("_MAT",
|
|
aml_buffer(madt_buf->len, (uint8_t *)madt_buf->data)));
|
|
aml_buffer(madt_buf->len, (uint8_t *)madt_buf->data)));
|
|
g_array_free(madt_buf, true);
|
|
g_array_free(madt_buf, true);
|