aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-02-18 19:14:30 +0000
committerMichael S. Tsirkin <mst@redhat.com>2015-02-26 13:04:13 +0100
commit04b8da543dd16afaea014032939db4cb54b15459 (patch)
tree3c76b2a28b033420d1307af480ccd77d9b7be67f
parentebc3028f7a2a164e442d734868e4168aa6040c81 (diff)
downloadqemu-04b8da543dd16afaea014032939db4cb54b15459.zip
qemu-04b8da543dd16afaea014032939db4cb54b15459.tar.gz
qemu-04b8da543dd16afaea014032939db4cb54b15459.tar.bz2
acpi: add aml_buffer() 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>
-rw-r--r--hw/acpi/aml-build.c7
-rw-r--r--include/hw/acpi/aml-build.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index fdeeacc..98b1540 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -506,6 +506,13 @@ Aml *aml_device(const char *name_format, ...)
return var;
}
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefBuffer */
+Aml *aml_buffer(void)
+{
+ Aml *var = aml_bundle(0x11 /* BufferOp */, AML_BUFFER);
+ return var;
+}
+
/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefPackage */
Aml *aml_package(uint8_t num_elements)
{
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 92097b5..5fe66c6 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -79,6 +79,7 @@ Aml *aml_device(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
Aml *aml_method(const char *name, int arg_count);
Aml *aml_if(Aml *predicate);
Aml *aml_package(uint8_t num_elements);
+Aml *aml_buffer(void);
/* other helpers */
GArray *build_alloc_array(void);