From patchwork Thu May 21 02:28:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 48824 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 14F81214BA for ; Thu, 21 May 2015 02:33:25 +0000 (UTC) Received: by wgbgf7 with SMTP id gf7sf20922334wgb.2 for ; Wed, 20 May 2015 19:33:24 -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=WrpjYbEcceRMHrfc/YKNu6CpclqoBGDMbKDD1gq/neOkzI2cb1aFn81ZjRqjbDgrT/ fAzFBJo/kZLm33Mnrm7RblHwT98mBhgY5ICdPHKFDaYvjvDMpd98uq1QqP29ocSQBRce lze7wX6gTJ0/sRhc6SkPp/O5vAqfV50e1HJQi6EZcdiWCUHKj7UTjQ644ZfTjHNHR9vp zlc8U5ZY7mYw4iNDhFmVoKFogJjor3giUCVR5pTCcFvxVFSPbqBgao6SLqdqDy7F1tze o+jHvNkocUGSX752Wcq5DvoBd+pGUPq6PcExPsWOWOi89ZWIpav8EnCXnfssCfSK5VrV nQIw== X-Gm-Message-State: ALoCoQklZS+X+x7ej0xkqWkKuBq0PppmUWeP6SXib1zEIAbUWK5iKwdPc5sB0uSaQEK4jnF0FdX3 X-Received: by 10.112.14.101 with SMTP id o5mr419343lbc.3.1432175604304; Wed, 20 May 2015 19:33:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.246.35 with SMTP id xt3ls8889lac.37.gmail; Wed, 20 May 2015 19:33:24 -0700 (PDT) X-Received: by 10.152.87.164 with SMTP id az4mr286089lab.123.1432175604180; Wed, 20 May 2015 19:33:24 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id y5si12315602lay.123.2015.05.20.19.33.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 19:33:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labbd9 with SMTP id bd9so93317485lab.2 for ; Wed, 20 May 2015 19:33:24 -0700 (PDT) X-Received: by 10.112.150.100 with SMTP id uh4mr308390lbb.112.1432175604092; Wed, 20 May 2015 19:33:24 -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 hn6csp228820lbb; Wed, 20 May 2015 19:33:23 -0700 (PDT) X-Received: by 10.140.19.17 with SMTP id 17mr580073qgg.12.1432175602641; Wed, 20 May 2015 19:33:22 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v94si5409045qge.82.2015.05.20.19.33.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 20 May 2015 19:33:22 -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]:54574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvGIT-0004e7-PY for patch@linaro.org; Wed, 20 May 2015 22:33:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvGFz-0000M7-J7 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-0005FJ-DK for qemu-devel@nongnu.org; Wed, 20 May 2015 22:30:47 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:36266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvGFu-0005El-HO 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 COD16473; 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:20 +0800 From: Shannon Zhao To: , , , , , , , , , , Date: Thu, 21 May 2015 10:28:43 +0800 Message-ID: <1432175331-12548-17-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 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.43 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);