]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
acpi: add aml_local() term
authorIgor Mammedov <imammedo@redhat.com>
Wed, 18 Feb 2015 19:14:36 +0000 (19:14 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 26 Feb 2015 12:04:15 +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 b91141e320930fd535655f3c7eacddcda7a0a717..fabd0adf28e7258fb62a745191429e9f7c187e06 100644 (file)
@@ -596,3 +596,14 @@ Aml *aml_field(const char *name, AmlFieldFlags flags)
     build_append_byte(var->buf, flags);
     return var;
 }
+
+/* ACPI 1.0b: 16.2.6.2 Local Objects Encoding */
+Aml *aml_local(int num)
+{
+    Aml *var;
+    uint8_t op = 0x60 /* Local0Op */ + num;
+
+    assert(num <= 7);
+    var = aml_opcode(op);
+    return var;
+}
index 2bb5f3938cadff83829f1099c9fcfac2dc9644bd..de081d68057f802967bd710f37e3b707bde0c40a 100644 (file)
@@ -91,6 +91,7 @@ Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t max_base,
 Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
                           uint32_t offset, uint32_t len);
 Aml *aml_named_field(const char *name, unsigned length);
+Aml *aml_local(int num);
 
 /* Block AML object primitives */
 Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);