From patchwork Tue Aug 16 10:25:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 73989 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1918188qga; Tue, 16 Aug 2016 03:29:02 -0700 (PDT) X-Received: by 10.107.20.206 with SMTP id 197mr43117477iou.103.1471343342882; Tue, 16 Aug 2016 03:29:02 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f184si21276425ith.102.2016.08.16.03.29.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 03:29:02 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZbaC-0001xq-Ry; Tue, 16 Aug 2016 10:26:56 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZbaB-0001wp-Ks for xen-devel@lists.xen.org; Tue, 16 Aug 2016 10:26:55 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id 24/36-03281-E6AE2B75; Tue, 16 Aug 2016 10:26:54 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRWlGSWpSXmKPExsVi9XuGg27eq03 hBu8Ws1os+biYxYHR4+ju30wBjFGsmXlJ+RUJrBnzv/SyF3zlrOhp3sLUwPiWvYuRk0NI4BSj xKpvVl2MXED2HkaJ9+/PM4Mk2AR0JT5unAJWJCIgK7G6aw47SBGzwHVGiTvvt7GCJIQF7CS+z HsKZrMIqEoc/vmcCcTmFfCU+P3tACOILSGgIbGydwJLFyMHBydQ/NoUNojFHhKnZy5khSgXlD g58wkLiM0sICFx8MULZohWRYm29SfZIGxJiYMrbrCA3CABcnRnzx4miISpROOPY+wTGAVnIZk 1C8msBYxMqxg1ilOLylKLdA1N9ZKKMtMzSnITM3N0DQ2M9XJTi4sT01NzEpOK9ZLzczcxAgOU AQh2MK7Z7nmIUZKDSUmUd+bEjeFCfEn5KZUZicUZ8UWlOanFhxhlODiUJHivvNgULiRYlJqeW pGWmQOMFZi0BAePkgjvd5A0b3FBYm5xZjpE6hSjopQ4r9xLoIQASCKjNA+uDRaflxhlpYR5GY EOEeIpSC3KzSxBlX/FKM7BqCTM+xdkPE9mXgnc9FdAi5mAFutLbwBZXJKIkJJqYDTrEq87XjX nX59o6JMjJ816+jO6TxZobZ3XxBebuzEq2keq9s6PL8f/T1u8/TOHyWcDj6P3tOcYG8ot7t5s c2U2n/vmpcWS+9d4LF04R6ylYsHjzl2h015oPfz4UkW0yzXfpmoOh8n01+fv3m+pa3PXmy/Vf PVdXWTKqxpV32MPJqyRX6L0PlWJpTgj0VCLuag4EQA6N9W3ygIAAA== X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-12.tower-31.messagelabs.com!1471343209!39117852!1 X-Originating-IP: [58.251.152.64] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32870 invoked from network); 16 Aug 2016 10:26:53 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (58.251.152.64) by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 16 Aug 2016 10:26:53 -0000 Received: from 172.24.1.36 (EHLO szxeml434-hub.china.huawei.com) ([172.24.1.36]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DPP02658; Tue, 16 Aug 2016 18:26:21 +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.235.1; Tue, 16 Aug 2016 18:25:39 +0800 From: Shannon Zhao To: Date: Tue, 16 Aug 2016 18:25:08 +0800 Message-ID: <1471343113-10652-12-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1471343113-10652-1-git-send-email-zhaoshenglong@huawei.com> References: <1471343113-10652-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.57B2EA4E.005A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 297f5ac2f5cd2d2223a0275da77f4542 Cc: sstabellini@kernel.org, wei.liu2@citrix.com, ian.jackson@eu.citrix.com, peter.huangpeng@huawei.com, julien.grall@arm.com, shannon.zhao@linaro.org, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH v4 11/16] libxl/arm: Construct ACPI DSDT table X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" From: Shannon Zhao Copy the static DSDT table into ACPI blob. Signed-off-by: Shannon Zhao --- tools/libxl/libxl_arm_acpi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c index cb1c9df..3154e0c 100644 --- a/tools/libxl/libxl_arm_acpi.c +++ b/tools/libxl/libxl_arm_acpi.c @@ -305,6 +305,15 @@ static void make_acpi_fadt(libxl__gc *gc, struct xc_dom_image *dom, acpitables[FADT].size); } +static void make_acpi_dsdt(libxl__gc *gc, struct xc_dom_image *dom, + struct acpitable acpitables[]) +{ + uint64_t offset = acpitables[DSDT].addr - GUEST_ACPI_BASE; + void *dsdt = dom->acpi_modules[0].data + offset; + + memcpy(dsdt, dsdt_anycpu_arm, dsdt_anycpu_arm_len); +} + int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, libxl__domain_build_state *state, struct xc_dom_image *dom) @@ -341,6 +350,7 @@ int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, goto out; make_acpi_fadt(gc, dom, acpitables); + make_acpi_dsdt(gc, dom, acpitables); out: return rc;