From patchwork Thu May 21 02:28:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 48829 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0CFD82121F for ; Thu, 21 May 2015 02:36:53 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf2728742lbb.0 for ; Wed, 20 May 2015 19:36:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding:cc :subject:precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=mMIgUrMmdhCJ1CbnLZHf5fgG4L/a7QBenAP3xtiKAIA=; b=NumHZzd4E0Z1knRiLf+eRabNSeZTdDslopvYkhu9JwetfAqm+8C/Kud5Z1dxwOEgw5 odTMX7O9pdj7DACtt9tVFPhj3xnnJVjBMYWNpf/SdECX7C9PSCnCjqY3GiJZY2fuoNl0 BjVylgIzXJVr7vHVQIeKwsodOfdmAijNUDcAUJ0IK+m81tUd5YM0WHlJgxMls5pBCTah 36BmOWqw1L0vr9jZAH94r3WCJdrXGH3X8z/U0acZjCFFahargq7fOw8FsJr4PR5+Kc6n Swi20EaQzr6s4KPX+FJ0J5SzwWJjVcIjEkcZnOAnAmjq/mYC+D0q7Szfp4e6b38RqpLE hfMw== X-Gm-Message-State: ALoCoQmjMQNPBsm3k6oaj2n/Gu26yf7oBuq9O7JNcEcDZgjehggSTDgdjTxSJ5LQslTNNm26Avax X-Received: by 10.112.14.101 with SMTP id o5mr430375lbc.3.1432175812012; Wed, 20 May 2015 19:36:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.39 with SMTP id kv7ls286339lac.63.gmail; Wed, 20 May 2015 19:36:51 -0700 (PDT) X-Received: by 10.112.204.72 with SMTP id kw8mr329670lbc.88.1432175811766; Wed, 20 May 2015 19:36:51 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id na4si12319170lbb.143.2015.05.20.19.36.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 19:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbzk7 with SMTP id zk7so7998264lbb.0 for ; Wed, 20 May 2015 19:36:51 -0700 (PDT) X-Received: by 10.112.29.36 with SMTP id g4mr343369lbh.56.1432175811347; Wed, 20 May 2015 19:36:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp230200lbb; Wed, 20 May 2015 19:36:50 -0700 (PDT) X-Received: by 10.55.17.133 with SMTP id 5mr1019185qkr.18.1432175810143; Wed, 20 May 2015 19:36:50 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z15si1150032qkz.60.2015.05.20.19.36.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 20 May 2015 19:36:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:54615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvGLp-0002Wo-68 for patch@linaro.org; Wed, 20 May 2015 22:36:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvGFz-0000M9-IN for qemu-devel@nongnu.org; Wed, 20 May 2015 22:30:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvGFv-0005FE-Cg for qemu-devel@nongnu.org; Wed, 20 May 2015 22:30:47 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:36267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvGFu-0005Eo-LP for qemu-devel@nongnu.org; Wed, 20 May 2015 22:30:43 -0400 Received: from 172.24.2.119 (EHLO szxeml434-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id COD16474; Thu, 21 May 2015 10:30:30 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml434-hub.china.huawei.com (10.82.67.225) with Microsoft SMTP Server id 14.3.158.1; Thu, 21 May 2015 10:30:22 +0800 From: Shannon Zhao To: , , , , , , , , , , Date: Thu, 21 May 2015 10:28:44 +0800 Message-ID: <1432175331-12548-18-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1432175331-12548-1-git-send-email-zhaoshenglong@huawei.com> References: <1432175331-12548-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 58.251.152.64 Cc: hangaohuai@huawei.com, zhaoshenglong@huawei.com, peter.huangpeng@huawei.com, shannon.zhao@linaro.org Subject: [Qemu-devel] [PATCH v8 17/24] hw/acpi/aml-build: Add aml_lnot() 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c | 8 ++++++++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 5002ad5..56cce41 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -607,6 +607,14 @@ Aml *aml_irq_no_flags(uint8_t irq) return var; } +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLNot */ +Aml *aml_lnot(Aml *arg) +{ + Aml *var = aml_opcode(0x92 /* LNotOp */); + aml_append(var, arg); + return var; +} + /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLEqual */ Aml *aml_equal(Aml *arg1, Aml *arg2) { diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 8690aeb..41b2cdd 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -222,6 +222,7 @@ Aml *aml_named_field(const char *name, unsigned length); Aml *aml_reserved_field(unsigned length); Aml *aml_local(int num); Aml *aml_string(const char *name_format, ...) GCC_FMT_ATTR(1, 2); +Aml *aml_lnot(Aml *arg); Aml *aml_equal(Aml *arg1, Aml *arg2); Aml *aml_processor(uint8_t proc_id, uint32_t pblk_addr, uint8_t pblk_len, const char *name_format, ...) GCC_FMT_ATTR(4, 5);