Signed-off-by: Igor Mammedov <imamm...@redhat.com>
---
 hw/acpi/acpi_gen_utils.c         | 7 +++++++
 include/hw/acpi/acpi_gen_utils.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c
index ae23b4a..d5acbcb 100644
--- a/hw/acpi/acpi_gen_utils.c
+++ b/hw/acpi/acpi_gen_utils.c
@@ -468,6 +468,13 @@ AcpiAml GCC_FMT_ATTR(1, 2) acpi_device(const char 
*name_format, ...)
     return var;
 }
 
+/* ACPI 5.0: 20.2.5.4 Type 2 Opcodes Encoding: DefBuffer */
+AcpiAml acpi_buffer(void)
+{
+    AcpiAml var = aml_allocate_internal(0x11 /* BufferOp */, BUFFER);
+    return var;
+}
+
 /* ACPI 5.0: 20.2.5.4 Type 2 Opcodes Encoding: DefPackage */
 AcpiAml acpi_package(uint8_t num_elements)
 {
diff --git a/include/hw/acpi/acpi_gen_utils.h b/include/hw/acpi/acpi_gen_utils.h
index e34e19a..a79c085 100644
--- a/include/hw/acpi/acpi_gen_utils.h
+++ b/include/hw/acpi/acpi_gen_utils.h
@@ -45,6 +45,7 @@ AcpiAml acpi_if(AcpiAml predicate);
 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_package(uint8_t num_elements);
 
 /* other helpers */
-- 
1.8.3.1


Reply via email to