From patchwork Wed Apr 15 13:25:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47185 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CAA022121F for ; Wed, 15 Apr 2015 13:33:04 +0000 (UTC) Received: by wixv7 with SMTP id v7sf11548693wix.0 for ; Wed, 15 Apr 2015 06:33:04 -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=Xtbtr3vfJ9cJ0bU4uJqTzx3qQTBt4a4MjJ5Y1MbSiT0=; b=eutqGMQnM1H6E2l8kRTlLNTaeDvl3QoKAOfKOeBZOegbJazoIe+QQmzOAKoY+wXD28 +f3Cfpjfm/sXUvZlVFoJrOOE9ngbJyVJYnlUETtKgJTNoZfMoyLaRfiJkUlzDLdi7GAI thIScolWtuR+YgZOzMzrl754JpRAnvhLNhjMSUvYx17qxYPveW4RK/99sWuFKQ/51gw9 cgBWK7+39C7rANOHIG3A4xZhkSeSZe4em4hxMopM10T0HWdNbztZ6d8YQLqY7qKQObRY x/fqLdn+IKGyPSBrjeAwgzkqLWDyDNksSTUdjs3dem7maml0Wi6fP8wPhWVglVlZgrq5 BJDg== X-Gm-Message-State: ALoCoQleq/R84kqkHLilRATLh8fe+KA6SDcWEtAYMWZW7qRxQBRrW5yWK7aebwwn/jps9nM0dIAe X-Received: by 10.152.206.36 with SMTP id ll4mr5316768lac.6.1429104784126; Wed, 15 Apr 2015 06:33:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.202.133 with SMTP id ki5ls196842lac.90.gmail; Wed, 15 Apr 2015 06:33:04 -0700 (PDT) X-Received: by 10.112.163.168 with SMTP id yj8mr23344528lbb.36.1429104784020; Wed, 15 Apr 2015 06:33:04 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id g1si200133lbs.32.2015.04.15.06.33.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Apr 2015 06:33:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbzk7 with SMTP id zk7so34099113lbb.0 for ; Wed, 15 Apr 2015 06:33:03 -0700 (PDT) X-Received: by 10.152.87.204 with SMTP id ba12mr24301828lab.35.1429104783935; Wed, 15 Apr 2015 06:33:03 -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 l1csp2516110lbt; Wed, 15 Apr 2015 06:33:03 -0700 (PDT) X-Received: by 10.194.63.16 with SMTP id c16mr50485115wjs.117.1429104783317; Wed, 15 Apr 2015 06:33:03 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j18si8141244wjr.158.2015.04.15.06.33.02 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 15 Apr 2015 06:33:03 -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]:60522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNR7-00075m-F8 for patch@linaro.org; Wed, 15 Apr 2015 09:33:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNLQ-0006Jk-D8 for qemu-devel@nongnu.org; Wed, 15 Apr 2015 09:27:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiNLP-0004xF-Ay for qemu-devel@nongnu.org; Wed, 15 Apr 2015 09:27:08 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:41939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNLO-0004v3-8u for qemu-devel@nongnu.org; Wed, 15 Apr 2015 09:27:07 -0400 Received: from 172.24.2.119 (EHLO szxeml427-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CME19611; Wed, 15 Apr 2015 21:26:42 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml427-hub.china.huawei.com (10.82.67.182) with Microsoft SMTP Server id 14.3.158.1; Wed, 15 Apr 2015 21:26:34 +0800 From: Shannon Zhao To: , , , , , , , , , , Date: Wed, 15 Apr 2015 21:25:04 +0800 Message-ID: <1429104309-3844-16-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1429104309-3844-1-git-send-email-zhaoshenglong@huawei.com> References: <1429104309-3844-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, shannon.zhao@linaro.org, peter.huangpeng@huawei.com, zhaoshenglong@huawei.com Subject: [Qemu-devel] [PATCH v5 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.217.180 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 cd4ffe2..139099f 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -608,6 +608,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 61c1a03..08b3fbd 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_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);