From patchwork Fri Dec 19 02:02:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 422702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8F2FD1400A0 for ; Fri, 19 Dec 2014 13:12:15 +1100 (AEDT) Received: from localhost ([::1]:56355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1n37-000063-Ft for incoming@patchwork.ozlabs.org; Thu, 18 Dec 2014 21:12:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1muU-0001AZ-Uy for qemu-devel@nongnu.org; Thu, 18 Dec 2014 21:03:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1muO-0002mv-ML for qemu-devel@nongnu.org; Thu, 18 Dec 2014 21:03:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1muO-0002mR-Cz for qemu-devel@nongnu.org; Thu, 18 Dec 2014 21:03:12 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBJ238cu017853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 18 Dec 2014 21:03:08 -0500 Received: from dell-pet610-01.lab.eng.brq.redhat.com (dell-pet610-01.lab.eng.brq.redhat.com [10.34.42.20]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBJ22lI5015753; Thu, 18 Dec 2014 21:03:07 -0500 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Fri, 19 Dec 2014 02:02:09 +0000 Message-Id: <1418954562-13716-15-git-send-email-imammedo@redhat.com> In-Reply-To: <1418954562-13716-1-git-send-email-imammedo@redhat.com> References: <1418954562-13716-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, drjones@redhat.com, claudio.fontana@huawei.com, mst@redhat.com Subject: [Qemu-devel] [RFC 14/47] acpi: add acpi_notify() term X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 10 ++++++++++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 15a65c2..d6bdc16 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/acpi_gen_utils.c @@ -376,6 +376,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_gen_utils.h b/include/hw/acpi/acpi_gen_utils.h index 50bb1aa..1395b32 100644 --- a/include/hw/acpi/acpi_gen_utils.h +++ b/include/hw/acpi/acpi_gen_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);