]> git.proxmox.com Git - mirror_qemu.git/commitdiff
acpi: add aml_equal() term
authorIgor Mammedov <imammedo@redhat.com>
Wed, 18 Feb 2015 19:14:40 +0000 (19:14 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 26 Feb 2015 12:04:16 +0000 (13:04 +0100)
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>
hw/acpi/aml-build.c
include/hw/acpi/aml-build.h

index 36aafe4bfbc787ae746b047f4f3952892f8a34ef..97b027c3807235e25c56a575b6fd3e99037926be 100644 (file)
@@ -514,6 +514,16 @@ Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t max_base,
     return var;
 }
 
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLEqual */
+Aml *aml_equal(Aml *arg1, Aml *arg2)
+{
+    Aml *var = aml_opcode(0x93 /* LequalOp */);
+    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)
 {
index 7f3886fc8f3ee73c569c55d6467c19ed96fe86f4..5e2b43498b47173eb2821843d3f82aed95489b5f 100644 (file)
@@ -93,6 +93,7 @@ Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
 Aml *aml_named_field(const char *name, unsigned length);
 Aml *aml_local(int num);
 Aml *aml_string(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
+Aml *aml_equal(Aml *arg1, Aml *arg2);
 
 /* Block AML object primitives */
 Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);