From patchwork Mon May 25 02:55:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 476055 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E006714027F for ; Mon, 25 May 2015 13:04:39 +1000 (AEST) Received: from localhost ([::1]:41693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywigv-00024c-Ji for incoming@patchwork.ozlabs.org; Sun, 24 May 2015 23:04:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwiZg-0004Bh-Ii for qemu-devel@nongnu.org; Sun, 24 May 2015 22:57:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwiZc-00016R-F2 for qemu-devel@nongnu.org; Sun, 24 May 2015 22:57:08 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:62171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwiZb-000168-Tp for qemu-devel@nongnu.org; Sun, 24 May 2015 22:57:04 -0400 Received: from 172.24.2.119 (EHLO szxeml428-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CLV56172; Mon, 25 May 2015 10:56:43 +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:33 +0800 From: Shannon Zhao To: , , , , , , , , , , Date: Mon, 25 May 2015 10:55:16 +0800 Message-ID: <1432522520-8068-21-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-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, zhaoshenglong@huawei.com, peter.huangpeng@huawei.com, shannon.zhao@linaro.org Subject: [Qemu-devel] [PATCH v9 20/24] 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- hw/acpi/aml-build.c | 18 ++++++++++++++++++ include/hw/acpi/aml-build.h | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 2927be1..bd91981 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -959,6 +959,24 @@ Aml *aml_word_io(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, } /* + * 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 * * More verbose description at: diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index ae62995..b81c838 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -236,6 +236,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, AmlCacheable cacheable, AmlReadAndWrite read_and_write,