From patchwork Thu May 7 09:29:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 48104 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 18B8320553 for ; Thu, 7 May 2015 09:43:58 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf10704945lbb.0 for ; Thu, 07 May 2015 02:43:57 -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=wCn1P+IA3bXvhLgkABvzYNIKZk1Z1gxzwjb3olrM9MQ=; b=h/1yUAfopQCWHtzhTUSWvNjnjV2aLW2Gm/oi8LcR1+xifBaJUPqwDz3befQtvpPksM +JKJrHsTtXI6RMWPEOcr6sJYiInKxaGgaydmm2z1xA5i5tPPnWLqk2DZP9eKxZ3waVKH ZmwR8iFgkcQKgKoiJomNoFr5XZCMn9BN/kCZgVrnlxzpFe74ob35PeC5e6eu0gF8vL8c algRyGAy17RfIkXtfQy3GVj/iWr9UyVTsNkMv5P9+II4OREM3rpQowSxBgDbhc6OkS6q 3QisFpsrPO/7gyAPbWZaC8LbyIv1dH19CioQIqhu+XZ0jDGJOIjKEuvwTtFSvDGE9zO+ EGDA== X-Gm-Message-State: ALoCoQmj52SXo3obfesIBpWchtM7dC2yrP9ci0+Ukgsm0opX64kvbxZsPSDpmENfENEFH64GieQQ X-Received: by 10.180.97.9 with SMTP id dw9mr1641837wib.2.1430991837071; Thu, 07 May 2015 02:43:57 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.43 with SMTP id ll11ls184101lac.12.gmail; Thu, 07 May 2015 02:43:56 -0700 (PDT) X-Received: by 10.112.157.164 with SMTP id wn4mr2399014lbb.100.1430991836949; Thu, 07 May 2015 02:43:56 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id yr11si933445lab.125.2015.05.07.02.43.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2015 02:43:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbzk7 with SMTP id zk7so26879534lbb.0 for ; Thu, 07 May 2015 02:43:56 -0700 (PDT) X-Received: by 10.112.163.168 with SMTP id yj8mr2377699lbb.36.1430991836672; Thu, 07 May 2015 02:43:56 -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.67.65 with SMTP id l1csp3332897lbt; Thu, 7 May 2015 02:43:56 -0700 (PDT) X-Received: by 10.55.21.139 with SMTP id 11mr6259456qkv.19.1430991834624; Thu, 07 May 2015 02:43:54 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d38si1419407qkh.119.2015.05.07.02.43.53 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 07 May 2015 02:43:54 -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]:49751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqILR-0000X5-M5 for patch@linaro.org; Thu, 07 May 2015 05:43:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqIAJ-0007pu-Cl for qemu-devel@nongnu.org; Thu, 07 May 2015 05:32:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqIAG-0001tr-2Z for qemu-devel@nongnu.org; Thu, 07 May 2015 05:32:23 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:42285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqIAF-0001sr-BV for qemu-devel@nongnu.org; Thu, 07 May 2015 05:32:20 -0400 Received: from 172.24.2.119 (EHLO szxeml426-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CNI17472; Thu, 07 May 2015 17:32:05 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.158.1; Thu, 7 May 2015 17:31:36 +0800 From: Shannon Zhao To: , , , , , , , , , , Date: Thu, 7 May 2015 17:29:18 +0800 Message-ID: <1430990964-10528-17-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1430990964-10528-1-git-send-email-zhaoshenglong@huawei.com> References: <1430990964-10528-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 v6 16/22] 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.169 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 --- 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 bda99bf..b03740d 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 a039ffe..6c3d17a 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -224,6 +224,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);