From patchwork Fri Sep 2 02:55:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 75276 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp623889qga; Thu, 1 Sep 2016 19:59:11 -0700 (PDT) X-Received: by 10.36.10.145 with SMTP id 139mr1712257itw.68.1472785137419; Thu, 01 Sep 2016 19:58:57 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 2si1973779iti.48.2016.09.01.19.58.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Sep 2016 19:58:57 -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 1bfeet-0006tB-CL; Fri, 02 Sep 2016 02:56:47 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfeer-0006qD-JV for xen-devel@lists.xen.org; Fri, 02 Sep 2016 02:56:45 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id 79/B3-05361-D6AE8C75; Fri, 02 Sep 2016 02:56:45 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRWlGSWpSXmKPExsVi9XuGg27OqxP hBudOaFks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBnfm3cwF3zlrPi1Yw1LA+Nb9i5GLg4hgVOM ErNeT2aEcHYzShybvZOti5GTg01AV+LjxinsILaIgKzE6q45YB3MAtcZJe6838YKkhAWsJM49 GYnI4jNIqAi8fjwJKAiDg5eAU+JrbN9QcISAhoSK3snsIDYnEDht6s+gc0UEvCQePzqEROIzS sgKHFy5hOwGmYBCYmDL14wQ/QqSrStP8kGYUtKHFxxgwXkBgmQqzf0fGeCSJhKTGjYyzKBUXA WklmzkMxawMi0ilG9OLWoLLVI11wvqSgzPaMkNzEzR9fQwEwvN7W4ODE9NScxqVgvOT93EyMw QBmAYAfjzMv+hxglOZiURHnzn5wIF+JLyk+pzEgszogvKs1JLT7EKMPBoSTBa/QSKCdYlJqeW pGWmQOMFZi0BAePkgjvCpA0b3FBYm5xZjpE6hSjopQ4bw5IQgAkkVGaB9cGi89LjLJSwryMQI cI8RSkFuVmlqDKv2IU52BUEuadCDKFJzOvBG76K6DFTECLS64dB1lckoiQkmpg9NA/qXL9tIw 5336xLHPBBNs39m5R9yfzOv5vX3HAYvaTsB19JyJPvfg976NQRtjU9pBrWmldlxeGes5S3MyV cfjjRz9R8fA525LYQmUrO08UT1rlcXzj+whPbt28l5+r9mRMfWCd7nKxya+9eXLkNtmyWomPM rciuN//TFulI7q7/Q379aLJSizFGYmGWsxFxYkA4QD9oMoCAAA= X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-6.tower-27.messagelabs.com!1472785000!57220743!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 758 invoked from network); 2 Sep 2016 02:56:44 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (58.251.152.64) by server-6.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 2 Sep 2016 02:56:44 -0000 Received: from 172.24.1.60 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.60]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DQM36334; Fri, 02 Sep 2016 10:56:23 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.235.1; Fri, 2 Sep 2016 10:56:08 +0800 From: Shannon Zhao To: Date: Fri, 2 Sep 2016 10:55:34 +0800 Message-ID: <1472784939-14404-12-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1472784939-14404-1-git-send-email-zhaoshenglong@huawei.com> References: <1472784939-14404-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.0A0B0203.57C8EA58.001A, 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: 935eefb76105597313ea3cc53c37ff85 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 v5 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 Acked-by: Julien Grall --- 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 407f9d5..30e4d66 100644 --- a/tools/libxl/libxl_arm_acpi.c +++ b/tools/libxl/libxl_arm_acpi.c @@ -329,6 +329,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) @@ -365,6 +374,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;