From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEJ6I-00030x-23 for qemu-devel@nongnu.org; Thu, 22 Jan 2015 09:51:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEJ6B-0003YC-I8 for qemu-devel@nongnu.org; Thu, 22 Jan 2015 09:51:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEJ6B-0003Xw-0X for qemu-devel@nongnu.org; Thu, 22 Jan 2015 09:51:07 -0500 From: Igor Mammedov Date: Thu, 22 Jan 2015 14:49:58 +0000 Message-Id: <1421938231-25698-15-git-send-email-imammedo@redhat.com> In-Reply-To: <1421938231-25698-1-git-send-email-imammedo@redhat.com> References: <1421938231-25698-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH v2 14/47] acpi: add acpi_notify() term List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, drjones@redhat.com, marcel.a@redhat.com, claudio.fontana@huawei.com, mst@redhat.com Signed-off-by: Igor Mammedov --- v2: * remove not needed backslash --- hw/acpi/acpi-build-utils.c | 10 ++++++++++ include/hw/acpi/acpi-build-utils.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/acpi-build-utils.c b/hw/acpi/acpi-build-utils.c index a575ba1..253fa78 100644 --- a/hw/acpi/acpi-build-utils.c +++ b/hw/acpi/acpi-build-utils.c @@ -401,6 +401,16 @@ AcpiAml acpi_and(AcpiAml arg1, AcpiAml arg2) return var; } +/* ACPI 5.0: 20.2.5.3 Type 1 Opcodes Encoding: DefNotify */ +AcpiAml acpi_notify(AcpiAml arg1, AcpiAml arg2) +{ + AcpiAml var = aml_allocate_internal(0, NON_BLOCK); + build_append_byte(var.buf, 0x86); /* NotifyOp */ + aml_append(&var, arg1); + aml_append(&var, arg2); + return var; +} + /* ACPI 5.0: 20.2.5.3 Type 1 Opcodes Encoding: DefIfElse */ AcpiAml acpi_if(AcpiAml predicate) { diff --git a/include/hw/acpi/acpi-build-utils.h b/include/hw/acpi/acpi-build-utils.h index 50bb1aa..1395b32 100644 --- a/include/hw/acpi/acpi-build-utils.h +++ b/include/hw/acpi/acpi-build-utils.h @@ -32,6 +32,7 @@ AcpiAml acpi_arg2(void); AcpiAml acpi_arg3(void); AcpiAml acpi_store(AcpiAml val, AcpiAml target); AcpiAml acpi_and(AcpiAml arg1, AcpiAml arg2); +AcpiAml acpi_notify(AcpiAml arg1, AcpiAml arg2); /* Block ASL object primitives */ AcpiAml acpi_if(AcpiAml predicate); -- 1.8.3.1