aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-02-18 19:14:25 +0000
committerMichael S. Tsirkin <mst@redhat.com>2015-02-26 13:04:12 +0100
commit926f5aaefad164dabcdd771f4c15c9773383d9e9 (patch)
tree4f24300000cd82232ac164b42aaafe0be8a45ddb /hw/acpi
parentc263b3f754325ae76946a5ea0e1df9368fe289bd (diff)
downloadqemu-926f5aaefad164dabcdd771f4c15c9773383d9e9.zip
qemu-926f5aaefad164dabcdd771f4c15c9773383d9e9.tar.gz
qemu-926f5aaefad164dabcdd771f4c15c9773383d9e9.tar.bz2
acpi: add aml_and() 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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 57e3176..bb1fbbc 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -417,6 +417,16 @@ Aml *aml_store(Aml *val, Aml *target)
return var;
}
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefAnd */
+Aml *aml_and(Aml *arg1, Aml *arg2)
+{
+ Aml *var = aml_opcode(0x7B /* AndOp */);
+ aml_append(var, arg1);
+ aml_append(var, arg2);
+ build_append_int(var->buf, 0x00 /* NullNameOp */);
+ return var;
+}
+
/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */
Aml *aml_if(Aml *predicate)
{