From patchwork Fri May 29 13:10:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 49176 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C0BB7218E7 for ; Fri, 29 May 2015 13:14:22 +0000 (UTC) Received: by laboh3 with SMTP id oh3sf12983377lab.0 for ; Fri, 29 May 2015 06:14:21 -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 :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=z6mQocN1ic8ll2U0aD17JcYOdVRp56wuMjlWiKR4aLQ=; b=WoKI2SGneLM+MorleEO8i4uOVwD4zZ97uD01bi+E8IqVotQ/lu2aPwOziVrNMp79Sr zMMnXVGH/1hXrteoEiV1Zbaiutl+7POmPZp2a/nitsGywETzoPwQG/WJ1SlIsj4hgR56 NHF4aPn7zCXNqttguNnOOEYtpGG/mdY66rdPhqzRSEvm53h41TtCe547RpFjtsMis2PS +3NIX8LY+ucUhb+N+7wBXlsfM6RD7vArAFtLwZF3tzoeTnkTi02z57mKhE/OuZonFO44 YJQgtU/ielSAabWGMY01chQcP1fYCeWvO9+Ui8EtCvIrd1V2AOAkbT/lBPYzAPQqPdBU 1GUw== X-Gm-Message-State: ALoCoQlDhg9wBIVyTIO30mbxBKCUKu+PBeKEh+yscHupnC5ZknXXkmWRaQwzw6o43FT0nAWBan61 X-Received: by 10.180.11.101 with SMTP id p5mr2896132wib.3.1432905257418; Fri, 29 May 2015 06:14:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.211 with SMTP id jq19ls358855lab.69.gmail; Fri, 29 May 2015 06:14:17 -0700 (PDT) X-Received: by 10.152.28.73 with SMTP id z9mr7783459lag.93.1432905257252; Fri, 29 May 2015 06:14:17 -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 h3si4648616lbj.145.2015.05.29.06.14.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 06:14:17 -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 labpy14 with SMTP id py14so43717741lab.0 for ; Fri, 29 May 2015 06:14:17 -0700 (PDT) X-Received: by 10.112.182.4 with SMTP id ea4mr2498252lbc.35.1432905257015; Fri, 29 May 2015 06:14:17 -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 hn6csp322795lbb; Fri, 29 May 2015 06:14:15 -0700 (PDT) X-Received: by 10.55.41.157 with SMTP id p29mr15382299qkp.44.1432905255353; Fri, 29 May 2015 06:14:15 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id h63si5510635qhc.102.2015.05.29.06.14.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 29 May 2015 06:14:15 -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]:35770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyK74-0000T1-AY for patch@linaro.org; Fri, 29 May 2015 09:14:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyK3v-0003sr-29 for qemu-devel@nongnu.org; Fri, 29 May 2015 09:11:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyK3r-0003X5-0F for qemu-devel@nongnu.org; Fri, 29 May 2015 09:10:58 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyK3q-0003US-PP for qemu-devel@nongnu.org; Fri, 29 May 2015 09:10:54 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YyK3i-0005o6-VF for qemu-devel@nongnu.org; Fri, 29 May 2015 14:10:46 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 29 May 2015 14:10:38 +0100 Message-Id: <1432905045-22138-33-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1432905045-22138-1-git-send-email-peter.maydell@linaro.org> References: <1432905045-22138-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 32/39] hw/acpi/aml-build: Add aml_else() 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: peter.maydell@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: Alex Bennée Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Message-id: 1432522520-8068-19-git-send-email-zhaoshenglong@huawei.com Signed-off-by: Peter Maydell --- hw/acpi/aml-build.c | 7 +++++++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 56cce41..cfe1b29 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -632,6 +632,13 @@ Aml *aml_if(Aml *predicate) return var; } +/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefElse */ +Aml *aml_else(void) +{ + Aml *var = aml_bundle(0xA1 /* ElseOp */, AML_PACKAGE); + return var; +} + /* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefMethod */ Aml *aml_method(const char *name, int arg_count) { diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 41b2cdd..c999ef1 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -254,6 +254,7 @@ Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2); Aml *aml_device(const char *name_format, ...) GCC_FMT_ATTR(1, 2); Aml *aml_method(const char *name, int arg_count); Aml *aml_if(Aml *predicate); +Aml *aml_else(void); Aml *aml_package(uint8_t num_elements); Aml *aml_buffer(int buffer_size, uint8_t *byte_list); Aml *aml_resource_template(void);