From patchwork Mon May 25 02:55:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 48945 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 E410A2121F for ; Mon, 25 May 2015 03:09:31 +0000 (UTC) Received: by wifq9 with SMTP id q9sf11063240wif.3 for ; Sun, 24 May 2015 20:09:31 -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=kdjrFRSwhpx5C0EWOd195SWkPr6JiavTBumYfI1H1nQ=; b=B4wu5P2K5s72OagJWN2vmq9MgSMzHV+4U0+TazqSuwpA2rWITLptzroXLrbujlNGuR 32DT3GUXN4TWQMGMESAyScB+QXm6vfhlxMu+FtpEsYeVd5J+xdzaC6RzEDcdHqJfoT7k BitfpiJuGKibCJESmYBSso7gx3j8iFebwcVNaICzoP7yCxPkJz3J/cD68Zm6DdfXB3vp KclcfS6EgHDoko+ZrRodyzyt8XXMXiuSR1oHzWV+MEEsdXpRPn1dUM7jpC2yDr8l76KL l5DDwrbPVj7OhuoGB630lCJViQbvjgTebCWa0EWVLcrrX0E4tpnWCnLlS7Uz4xa/FATD QLiA== X-Gm-Message-State: ALoCoQlCI+ntjYRClPsbWy/AIMnWjI+8zDJeO4gfJro0f15gNF+bfFn5CEUlti2UbC9OsFkfmtdV X-Received: by 10.152.4.230 with SMTP id n6mr20279844lan.2.1432523370989; Sun, 24 May 2015 20:09:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.37 with SMTP id p5ls742518lah.9.gmail; Sun, 24 May 2015 20:09:30 -0700 (PDT) X-Received: by 10.153.6.36 with SMTP id cr4mr16683307lad.56.1432523370623; Sun, 24 May 2015 20:09:30 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id j1si7323855lbc.15.2015.05.24.20.09.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 May 2015 20:09:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by laat2 with SMTP id t2so41847442laa.1 for ; Sun, 24 May 2015 20:09:30 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr15974879lbc.41.1432523370503; Sun, 24 May 2015 20:09:30 -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 hn6csp1544921lbb; Sun, 24 May 2015 20:09:29 -0700 (PDT) X-Received: by 10.55.53.143 with SMTP id c137mr41099956qka.15.1432523368938; Sun, 24 May 2015 20:09:28 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 23si5687678qhy.21.2015.05.24.20.09.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 24 May 2015 20:09:28 -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]:41742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywilc-0001Fh-1G for patch@linaro.org; Sun, 24 May 2015 23:09:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywii8-00042Y-MB for qemu-devel@nongnu.org; Sun, 24 May 2015 23:05:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ywii1-0003sk-Fb for qemu-devel@nongnu.org; Sun, 24 May 2015 23:05:52 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:9298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywii0-0003ry-EI for qemu-devel@nongnu.org; Sun, 24 May 2015 23:05:45 -0400 Received: from 172.24.2.119 (EHLO szxeml428-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BGM69620; Mon, 25 May 2015 10:56:36 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml428-hub.china.huawei.com (10.82.67.183) with Microsoft SMTP Server id 14.3.158.1; Mon, 25 May 2015 10:56:25 +0800 From: Shannon Zhao To: , , , , , , , , , , Date: Mon, 25 May 2015 10:55:12 +0800 Message-ID: <1432522520-8068-17-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1432522520-8068-1-git-send-email-zhaoshenglong@huawei.com> References: <1432522520-8068-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.0A020205.55628F65.0012, ss=1, re=0.000, 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: ccf959a769b790c3d219397b1305f190 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, zhaoshenglong@huawei.com, peter.huangpeng@huawei.com, shannon.zhao@linaro.org Subject: [Qemu-devel] [PATCH v9 16/24] hw/acpi/aml-build: Add aml_or() 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.45 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: Igor Mammedov --- hw/acpi/aml-build.c | 10 ++++++++++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ebce504..5002ad5 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -455,6 +455,16 @@ Aml *aml_and(Aml *arg1, Aml *arg2) return var; } +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefOr */ +Aml *aml_or(Aml *arg1, Aml *arg2) +{ + Aml *var = aml_opcode(0x7D /* OrOp */); + aml_append(var, arg1); + aml_append(var, arg2); + build_append_byte(var->buf, 0x00 /* NullNameOp */); + return var; +} + /* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefNotify */ Aml *aml_notify(Aml *arg1, Aml *arg2) { diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index a873b46..8690aeb 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -201,6 +201,7 @@ Aml *aml_int(const uint64_t val); Aml *aml_arg(int pos); Aml *aml_store(Aml *val, Aml *target); Aml *aml_and(Aml *arg1, Aml *arg2); +Aml *aml_or(Aml *arg1, Aml *arg2); Aml *aml_notify(Aml *arg1, Aml *arg2); Aml *aml_call1(const char *method, Aml *arg1); Aml *aml_call2(const char *method, Aml *arg1, Aml *arg2);