From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOCXI-0004gs-4r for qemu-devel@nongnu.org; Wed, 18 Feb 2015 16:52:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOCXH-0005nX-6K for qemu-devel@nongnu.org; Wed, 18 Feb 2015 16:52:00 -0500 Received: from mail.kernel.org ([198.145.29.136]:52441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOCXH-0005mY-13 for qemu-devel@nongnu.org; Wed, 18 Feb 2015 16:51:59 -0500 Date: Wed, 18 Feb 2015 22:51:53 +0100 From: "Michael S. Tsirkin" Message-ID: <1424295164-4774-84-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 83/96] acpi: add aml_equal() 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 | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 7f3886f..5e2b434 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -93,6 +93,7 @@ Aml *aml_operation_region(const char *name, AmlRegionSpace rs, Aml *aml_named_field(const char *name, unsigned length); Aml *aml_local(int num); Aml *aml_string(const char *name_format, ...) GCC_FMT_ATTR(1, 2); +Aml *aml_equal(Aml *arg1, Aml *arg2); /* Block AML object primitives */ Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2); diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 36aafe4..97b027c 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -514,6 +514,16 @@ Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t max_base, return var; } +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLEqual */ +Aml *aml_equal(Aml *arg1, Aml *arg2) +{ + Aml *var = aml_opcode(0x93 /* LequalOp */); + aml_append(var, arg1); + aml_append(var, arg2); + build_append_int(var->buf, 0x00); /* NullNameOp */ + return var; +} + /* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */ Aml *aml_if(Aml *predicate) { -- MST