From patchwork Fri Apr 3 10:03:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 46748 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 40ED9216D1 for ; Fri, 3 Apr 2015 10:09:47 +0000 (UTC) Received: by wixm2 with SMTP id m2sf23811165wix.0 for ; Fri, 03 Apr 2015 03:09:46 -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: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=yydKnLhRfhQvf6Vkw7/y7e1UCOEMFWaU7ZbhBULNiZI=; b=KWIusZRlW1uZGzIU5fT5oQNcuBxL4pZaZup7ysIWDAGzT9R/E78IXASq3aBRZAAasa tISze4kIYWop5h0sFtPrfm434TeWdL9Fmkxp3Y6dIQpMJCmuKEY22byU2hMCVitg2r2e vdwYu97hD7cN/0hL5aru028prt1Nta7DbQtiqloxqtrxSOKdx4AqBU2bto/2kw7adVu7 I3Y24Lv7NixLvVf1SAdyIPfvyHCPy0FI+X+izrYgRM6Ow594u63we2X8DXjbEbURGl8N fiSGlLiqCHiTMYSHPmy1FzIm7Vyydx1woegebVDk+r4lqi5j2N+CobHAw1MVcieDmdXV INNQ== X-Gm-Message-State: ALoCoQlBW/lyTUSjvy9EylqQGziH2mvOuLPntu12E6EIgPiV2cwkMdUlv18hEKyLnKO2dKUmv610 X-Received: by 10.112.235.70 with SMTP id uk6mr422917lbc.24.1428055786534; Fri, 03 Apr 2015 03:09:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.131 with SMTP id dg3ls309311lac.74.gmail; Fri, 03 Apr 2015 03:09:46 -0700 (PDT) X-Received: by 10.112.122.33 with SMTP id lp1mr1546258lbb.110.1428055786262; Fri, 03 Apr 2015 03:09:46 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id c5si2167809lag.135.2015.04.03.03.09.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2015 03:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lajy8 with SMTP id y8so77068287laj.0 for ; Fri, 03 Apr 2015 03:09:45 -0700 (PDT) X-Received: by 10.152.87.204 with SMTP id ba12mr1572270lab.35.1428055785729; Fri, 03 Apr 2015 03:09:45 -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.57.201 with SMTP id k9csp1859590lbq; Fri, 3 Apr 2015 03:09:45 -0700 (PDT) X-Received: by 10.140.232.3 with SMTP id d3mr1856211qhc.46.1428055784577; Fri, 03 Apr 2015 03:09:44 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id i77si7674419qge.99.2015.04.03.03.09.44 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 03 Apr 2015 03:09:44 -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]:33296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdyXn-0007HO-Kf for patch@linaro.org; Fri, 03 Apr 2015 06:09:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdyUU-0001fH-ED for qemu-devel@nongnu.org; Fri, 03 Apr 2015 06:06:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdyUT-00067g-Ky for qemu-devel@nongnu.org; Fri, 03 Apr 2015 06:06:18 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:9592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdyUT-00062x-2h for qemu-devel@nongnu.org; Fri, 03 Apr 2015 06:06:17 -0400 Received: from 172.24.2.119 (EHLO szxeml425-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BDZ47804; Fri, 03 Apr 2015 18:06:00 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml425-hub.china.huawei.com (10.82.67.180) with Microsoft SMTP Server id 14.3.158.1; Fri, 3 Apr 2015 18:05:51 +0800 From: Shannon Zhao To: , , , , , , , , , , Date: Fri, 3 Apr 2015 18:03:47 +0800 Message-ID: <1428055432-12120-16-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1428055432-12120-1-git-send-email-zhaoshenglong@huawei.com> References: <1428055432-12120-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.551E6608.01EE, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c2752db7f8d763592732525fefcb67cb X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.66 Cc: hangaohuai@huawei.com, shannon.zhao@linaro.org, peter.huangpeng@huawei.com, zhaoshenglong@huawei.com Subject: [Qemu-devel] [PATCH v4 15/20] hw/acpi/aml-build: Add aml_not() 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.215.52 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 | 9 +++++++++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 312afb6..4f936f7 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -600,6 +600,15 @@ Aml *aml_irq_no_flags(uint8_t irq) return var; } +/* ACPI 1.0: 16.2.3 Operators: DefLNot */ +Aml *aml_not(Aml *arg) +{ + Aml *var = aml_opcode(0x92 /* LNotOp */); + aml_append(var, arg); + build_append_int(var->buf, 0x00); /* NullNameOp */ + 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 3473d6e..6b407d5 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -174,6 +174,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_not(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);