From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOCWT-00037W-9J for qemu-devel@nongnu.org; Wed, 18 Feb 2015 16:51:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOCWS-0005HZ-Gu for qemu-devel@nongnu.org; Wed, 18 Feb 2015 16:51:09 -0500 Received: from mail.kernel.org ([198.145.29.136]:52322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOCWS-0005HQ-BL for qemu-devel@nongnu.org; Wed, 18 Feb 2015 16:51:08 -0500 Date: Wed, 18 Feb 2015 22:51:02 +0100 From: "Michael S. Tsirkin" Message-ID: <1424295164-4774-74-git-send-email-mst@redhat.com> References: <1424295164-4774-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424295164-4774-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 73/96] acpi: add aml_buffer() term List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Igor Mammedov , dgilbert@redhat.com, Juan Quintela From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/aml-build.h | 1 + hw/acpi/aml-build.c | 7 +++++++ 2 files changed, 8 insertions(+) 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); 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) { -- MST