aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-02-18 19:14:19 +0000
committerMichael S. Tsirkin <mst@redhat.com>2015-02-26 13:04:10 +0100
commit32acac9eb3478cb1229654883f938ab21d28d998 (patch)
tree14608fbeb6f7208857ab18cc4b79449709b27256 /hw/acpi
parentea2407d7e8adae1ab6cd0ca0366752d101d2344f (diff)
downloadqemu-32acac9eb3478cb1229654883f938ab21d28d998.zip
qemu-32acac9eb3478cb1229654883f938ab21d28d998.tar.gz
qemu-32acac9eb3478cb1229654883f938ab21d28d998.tar.bz2
acpi: add aml_if() 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')
-rw-r--r--hw/acpi/aml-build.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 4e0685e..d19d1fb 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -356,6 +356,14 @@ Aml *aml_scope(const char *name_format, ...)
return var;
}
+/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */
+Aml *aml_if(Aml *predicate)
+{
+ Aml *var = aml_bundle(0xA0 /* IfOp */, AML_PACKAGE);
+ aml_append(var, predicate);
+ return var;
+}
+
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefMethod */
Aml *aml_method(const char *name, int arg_count)
{