aboutsummaryrefslogtreecommitdiff
path: root/hw/isa
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-04-29 15:59:53 +0200
committerMichael S. Tsirkin <mst@redhat.com>2020-05-04 10:25:02 -0400
commita53e581ee818d44bea9dcd2c543c2d08a5934fae (patch)
tree93af0d7b5711fad1978bfd40fa5f5c01c3368ed5 /hw/isa
parent88b3648f557855f7da85b5d32f1a08c5a66c2a01 (diff)
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);