qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v3 26/52] acpi: add aml_resource_template() helper


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH v3 26/52] acpi: add aml_resource_template() helper
Date: Mon, 9 Feb 2015 10:53:48 +0000

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

diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 6488433..452db25 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -557,6 +557,14 @@ Aml *aml_device(const char *name_format, ...)
     return var;
 }
 
+/* ACPI 1.0b: 6.4.1 ASL Macros for Resource Descriptors */
+Aml *aml_resource_template(void)
+{
+    /* ResourceTemplate is a buffer of Resources with EndTag at the end */
+    Aml *var = aml_bundle(0x11 /* BufferOp */, AML_RES_TEMPLATE);
+    return var;
+}
+
 /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefBuffer */
 Aml *aml_buffer(void)
 {
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 06826df..6a8aaef 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -94,6 +94,7 @@ 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);
+Aml *aml_resource_template(void);
 
 /* other helpers */
 GArray *build_alloc_array(void);
-- 
1.8.3.1




reply via email to

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