From patchwork Fri Apr 3 10:03:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 46763 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 CBE66216D1 for ; Fri, 3 Apr 2015 10:19:04 +0000 (UTC) Received: by labgx2 with SMTP id gx2sf18975992lab.1 for ; Fri, 03 Apr 2015 03:19:03 -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=mGRWJOWcEEGrO2mDSi9uBjorUejlzfQUTJbmAN6YWaY=; b=F8/SiTy+8fSZShHfQdfteLJS3ZBBAl2aHRJ3f5vZWEtqlnPwObwesjX7/aBwvNQTZA 8oWER+voXOpVAR/dQZXxRXs3rrXi108hUGZjlGfxAReupwfLs9BJq5kcstec/n2S/oy3 yk6YAgqBIfxGR9u4Nwrw94hkukWDu9Bf/nHwJlFwmPNhThdFEeLfWeIuv4k14PsuPBgv UzdD4T0U9JAkjulYZ+ePn5+oGW2po/x5E15Yb5qzrr/nymUl4md5FNNLNiUNu8iCyd8q sRyHGqg25NS/xTfa5lVXHe4ab+u1ivNXkCuytbstWqzQJSBb1pbWQZOJDPSx+nwhLYdo b1+w== X-Gm-Message-State: ALoCoQkipvW6ufDue1wu35wLkKxJ29sRoKVoNz64TjmDTQGD8dLKIoi5W7t5n9H9plaloxZztQ23 X-Received: by 10.180.91.76 with SMTP id cc12mr553379wib.7.1428056343687; Fri, 03 Apr 2015 03:19:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.66 with SMTP id q2ls286087laq.66.gmail; Fri, 03 Apr 2015 03:19:03 -0700 (PDT) X-Received: by 10.112.131.66 with SMTP id ok2mr1544554lbb.51.1428056343394; Fri, 03 Apr 2015 03:19:03 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id a15si6356067lbq.90.2015.04.03.03.19.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2015 03:19:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbdc10 with SMTP id c10so76353023lbd.2 for ; Fri, 03 Apr 2015 03:19:03 -0700 (PDT) X-Received: by 10.152.26.34 with SMTP id i2mr1526724lag.117.1428056343269; Fri, 03 Apr 2015 03:19: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.57.201 with SMTP id k9csp1863829lbq; Fri, 3 Apr 2015 03:19:02 -0700 (PDT) X-Received: by 10.140.38.100 with SMTP id s91mr1772577qgs.37.1428056341990; Fri, 03 Apr 2015 03:19:01 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id x10si7733158qgx.9.2015.04.03.03.19.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 03 Apr 2015 03:19:01 -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]:33401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ydygn-0005tw-4f for patch@linaro.org; Fri, 03 Apr 2015 06:19:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdyXc-0007eU-5W for qemu-devel@nongnu.org; Fri, 03 Apr 2015 06:09:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdyXa-0003l3-UQ for qemu-devel@nongnu.org; Fri, 03 Apr 2015 06:09:32 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:9519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdyXa-0003Y2-53 for qemu-devel@nongnu.org; Fri, 03 Apr 2015 06:09:30 -0400 Received: from 172.24.2.119 (EHLO szxeml425-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CJI43169; Fri, 03 Apr 2015 18:06:05 +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:54 +0800 From: Shannon Zhao To: , , , , , , , , , , Date: Fri, 3 Apr 2015 18:03:50 +0800 Message-ID: <1428055432-12120-19-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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.65 Cc: hangaohuai@huawei.com, shannon.zhao@linaro.org, peter.huangpeng@huawei.com, zhaoshenglong@huawei.com Subject: [Qemu-devel] [PATCH v4 18/20] hw/acpi/aml-build: Add aml_dword_io() 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.170 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 | 17 +++++++++++++++++ include/hw/acpi/aml-build.h | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 221d054..2076ba1 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -937,6 +937,23 @@ Aml *aml_word_io(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, addr_gran, addr_min, addr_max, addr_trans, len, isa_ranges); } +/* + * ACPI 1.0b: 6.4.3.5.4 ASL Macros for DWORD Address Descriptor + * + * More verbose description at: + * ACPI 5.0: 19.5.33 DWordIO (DWord IO Resource Descriptor Macro) + */ +Aml *aml_dword_io(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, + AmlDecode dec, AmlISARanges isa_ranges, + uint32_t addr_gran, uint32_t addr_min, + uint32_t addr_max, uint32_t addr_trans, + uint32_t len) + +{ + return aml_dword_as_desc(aml_io_range, min_fixed, max_fixed, dec, + addr_gran, addr_min, addr_max, addr_trans, len, + isa_ranges); +} /* * ACPI 1.0b: 6.4.3.5.4 ASL Macros for DWORD Address Space Descriptor diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 0d923e8..adefc25 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -188,6 +188,11 @@ Aml *aml_word_io(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, uint16_t addr_gran, uint16_t addr_min, uint16_t addr_max, uint16_t addr_trans, uint16_t len); +Aml *aml_dword_io(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, + AmlDecode dec, AmlISARanges isa_ranges, + uint32_t addr_gran, uint32_t addr_min, + uint32_t addr_max, uint32_t addr_trans, + uint32_t len); Aml *aml_dword_memory(AmlDecode dec, AmlMinFixed min_fixed, AmlMaxFixed max_fixed, AmlCacheble cacheable, AmlReadAndWrite read_and_write,