qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 21/47] acpi: add acpi_resource_template() helper


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH v2 21/47] acpi: add acpi_resource_template() helper
Date: Thu, 22 Jan 2015 14:50:05 +0000

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

diff --git a/hw/acpi/acpi-build-utils.c b/hw/acpi/acpi-build-utils.c
index 2d5e77a..32a4377 100644
--- a/hw/acpi/acpi-build-utils.c
+++ b/hw/acpi/acpi-build-utils.c
@@ -493,6 +493,14 @@ AcpiAml GCC_FMT_ATTR(1, 2) acpi_device(const char 
*name_format, ...)
     return var;
 }
 
+/* ResourceTemplate marcos helper */
+AcpiAml acpi_resource_template(void)
+{
+    /* ResourceTemplate is a buffer of Resources with EndTag at the end */
+    AcpiAml var = aml_allocate_internal(0x11 /* BufferOp */, RES_TEMPLATE);
+    return var;
+}
+
 /* ACPI 5.0: 20.2.5.4 Type 2 Opcodes Encoding: DefBuffer */
 AcpiAml acpi_buffer(void)
 {
diff --git a/include/hw/acpi/acpi-build-utils.h 
b/include/hw/acpi/acpi-build-utils.h
index a79c085..594fae7 100644
--- a/include/hw/acpi/acpi-build-utils.h
+++ b/include/hw/acpi/acpi-build-utils.h
@@ -46,6 +46,7 @@ AcpiAml acpi_method(const char *name, int arg_count);
 AcpiAml GCC_FMT_ATTR(1, 2) acpi_scope(const char *name_format, ...);
 AcpiAml GCC_FMT_ATTR(1, 2) acpi_device(const char *name_format, ...);
 AcpiAml acpi_buffer(void);
+AcpiAml acpi_resource_template(void);
 AcpiAml acpi_package(uint8_t num_elements);
 
 /* other helpers */
-- 
1.8.3.1




reply via email to

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