qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 82/96] acpi: add aml_varpackage() term


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PULL 82/96] acpi: add aml_varpackage() term
Date: Wed, 18 Feb 2015 22:51:48 +0100

From: Igor Mammedov <address@hidden>

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
 include/hw/acpi/aml-build.h | 1 +
 hw/acpi/aml-build.c         | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index b1eab3c..7f3886f 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -103,6 +103,7 @@ Aml *aml_package(uint8_t num_elements);
 Aml *aml_buffer(void);
 Aml *aml_resource_template(void);
 Aml *aml_field(const char *name, AmlFieldFlags flags);
+Aml *aml_varpackage(uint32_t num_elements);
 
 /* other helpers */
 GArray *build_alloc_array(void);
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 57a65dd..36aafe4 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -632,3 +632,11 @@ Aml *aml_local(int num)
     var = aml_opcode(op);
     return var;
 }
+
+/* ACPI 2.0a: 17.2.2 Data Objects Encoding: DefVarPackage */
+Aml *aml_varpackage(uint32_t num_elements)
+{
+    Aml *var = aml_bundle(0x13 /* VarPackageOp */, AML_PACKAGE);
+    build_append_int(var->buf, num_elements);
+    return var;
+}
-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]