summary refs log tree commit diff stats
path: root/hw/acpi/aml-build.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-02-18 19:14:17 +0000
committerMichael S. Tsirkin <mst@redhat.com>2015-02-26 13:04:10 +0100
commitbe06ebd0a4d42ccd3d79fae24e48c264be377356 (patch)
tree662dfde6af079327780c75c8ce142db0705841be /hw/acpi/aml-build.c
parent011bb7490bf32d84e644d79570f603651e4f80cb (diff)
downloadfocaccia-qemu-be06ebd0a4d42ccd3d79fae24e48c264be377356.tar.gz
focaccia-qemu-be06ebd0a4d42ccd3d79fae24e48c264be377356.zip
acpi: add aml_device() term
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi/aml-build.c')
-rw-r--r--hw/acpi/aml-build.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index f891406d5f..c955d664ae 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -355,3 +355,14 @@ Aml *aml_scope(const char *name_format, ...)
     va_end(ap);
     return var;
 }
+
+/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefDevice */
+Aml *aml_device(const char *name_format, ...)
+{
+    va_list ap;
+    Aml *var = aml_bundle(0x82 /* DeviceOp */, AML_EXT_PACKAGE);
+    va_start(ap, name_format);
+    build_append_namestringv(var->buf, name_format, ap);
+    va_end(ap);
+    return var;
+}