hw/arm/virt: Assign virt_madt_cpu_entry to acpi_ged madt_cpu hook
In build_cpus_aml, we will invoke this hook to build _MAT aml mehtod for cpus. Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> (cherry picked from commit 80bcd0313ba67d5c4439030c96c26aee1d9288f9)
This commit is contained in:
parent
e207f53959
commit
1906aad039
40
hw-arm-virt-Assign-virt_madt_cpu_entry-to-acpi_ged-m.patch
Normal file
40
hw-arm-virt-Assign-virt_madt_cpu_entry-to-acpi_ged-m.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From ae74dda87e172ce82a8180d1a2e9c62904390f91 Mon Sep 17 00:00:00 2001
|
||||
From: Keqian Zhu <zhukeqian1@huawei.com>
|
||||
Date: Fri, 10 Apr 2020 10:05:54 +0800
|
||||
Subject: [PATCH] hw/arm/virt: Assign virt_madt_cpu_entry to acpi_ged madt_cpu
|
||||
hook
|
||||
|
||||
In build_cpus_aml, we will invoke this hook to build _MAT
|
||||
aml mehtod for cpus.
|
||||
|
||||
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
|
||||
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
|
||||
---
|
||||
hw/arm/virt.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
|
||||
index 47e98f09e8..44c29070c4 100644
|
||||
--- a/hw/arm/virt.c
|
||||
+++ b/hw/arm/virt.c
|
||||
@@ -684,6 +684,7 @@ static void fdt_add_pmu_nodes(const VirtMachineState *vms)
|
||||
static inline DeviceState *create_acpi_ged(VirtMachineState *vms)
|
||||
{
|
||||
DeviceState *dev;
|
||||
+ AcpiDeviceIfClass *adevc;
|
||||
MachineState *ms = MACHINE(vms);
|
||||
int irq = vms->irqmap[VIRT_ACPI_GED];
|
||||
uint32_t event = ACPI_GED_PWR_DOWN_EVT;
|
||||
@@ -699,6 +700,9 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)
|
||||
dev = qdev_new(TYPE_ACPI_GED);
|
||||
qdev_prop_set_uint32(dev, "ged-event", event);
|
||||
|
||||
+ adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
|
||||
+ adevc->madt_cpu = virt_madt_cpu_entry;
|
||||
+
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, vms->memmap[VIRT_ACPI_GED].base);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, vms->memmap[VIRT_PCDIMM_ACPI].base);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, qdev_get_gpio_in(vms->gic, irq));
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user