summaryrefslogtreecommitdiffstats
path: root/hw/isa
diff options
context:
space:
mode:
authorGerd Hoffmann2020-04-29 15:59:53 +0200
committerMichael S. Tsirkin2020-05-04 16:25:02 +0200
commita53e581ee818d44bea9dcd2c543c2d08a5934fae (patch)
tree93af0d7b5711fad1978bfd40fa5f5c01c3368ed5 /hw/isa
parentacpi: drop pointless _STA method (diff)
downloadqemu-a53e581ee818d44bea9dcd2c543c2d08a5934fae.tar.gz
qemu-a53e581ee818d44bea9dcd2c543c2d08a5934fae.tar.xz
qemu-a53e581ee818d44bea9dcd2c543c2d08a5934fae.zip
acpi: add ISADeviceClass->build_aml()
Also add isa_aml_build() function which walks all isa devices. This allows to move aml builder code to isa devices. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20200429140003.7336-6-kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/isa')
-rw-r--r--hw/isa/isa-bus.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index 798dd9194e..1f2189f4d5 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -207,6 +207,21 @@ ISADevice *isa_vga_init(ISABus *bus)
}
}
+void isa_build_aml(ISABus *bus, Aml *scope)
+{
+ BusChild *kid;
+ ISADevice *dev;
+ ISADeviceClass *dc;
+
+ QTAILQ_FOREACH(kid, &bus->parent_obj.children, sibling) {
+ dev = ISA_DEVICE(kid->child);
+ dc = ISA_DEVICE_GET_CLASS(dev);
+ if (dc->build_aml) {
+ dc->build_aml(dev, scope);
+ }
+ }
+}
+
static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent)
{
ISADevice *d = ISA_DEVICE(dev);