From patchwork Thu Sep 22 12:52:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 76785 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp15085qgf; Thu, 22 Sep 2016 05:56:13 -0700 (PDT) X-Received: by 10.36.158.213 with SMTP id p204mr9977219itd.99.1474548973136; Thu, 22 Sep 2016 05:56:13 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id m64si1972792ite.87.2016.09.22.05.56.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2016 05:56:13 -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 1bn3WC-0004du-28; Thu, 22 Sep 2016 12:54:24 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn3WA-0004cm-QU for xen-devel@lists.xen.org; Thu, 22 Sep 2016 12:54:22 +0000 Received: from [85.158.137.68] by server-3.bemta-3.messagelabs.com id 5C/CC-23620-E74D3E75; Thu, 22 Sep 2016 12:54:22 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRWlGSWpSXmKPExsVSPpHPSbf2yuN wg5lPpC2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oxjTzpZCxZzVSzu2sPWwDido4uRi0NI4Ayj xJ+LZ5khnD2MEk92nGLrYuTkYBPQkjg//Qc7iC0iICuxumsOO0gRs8B1Rok777exgiSEBewkJ s+ewgRiswioSlx//Z4FxOYV8JRouXCDEcSWENCQWNk7ASzOCRSfcGQ9WK+QgIfEyisLWSHqBS VOznwCVsMsICFx8MULZoheRYm29SfZIGxJiYMrbrCAHCEhcIpRYtu+X1BFphIHX09gnMAoOAv JrFlIZi1gZFrFqFGcWlSWWqRrZKGXVJSZnlGSm5iZo2toYKyXm1pcnJiempOYVKyXnJ+7iREY pPUMDIw7GNtP+B1ilORgUhLlvdD/OFyILyk/pTIjsTgjvqg0J7X4EKMMB4eSBG/CZaCcYFFqe mpFWmYOMF5g0hIcPEoivMUgad7igsTc4sx0iNQpRkUpcd46kIQASCKjNA+uDRajlxhlpYR5GR kYGIR4ClKLcjNLUOVfMYpzMCoJ8/aATOHJzCuBm/4KaDET0OItPx+ALC5JREhJNTD2v/70qll 11k2WvSF7Pl+Z5DhH2Nomq2TRU4tD1hxfni05HO1eVXfRIz3euaFVZOJ2lscvXtp6Ly1I07e5 0DUj7vX9o7+FlMt1WLnXh05+u8Er9cOGKRx7Mz/WXq3f2H9iVm5dbd7dXdMq0uc1Mex1CpL5f men6iJTW7+95/3lP+4PunPzbYW2EktxRqKhFnNRcSIA0HR2HMwCAAA= X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1474548856!62137855!1 X-Originating-IP: [119.145.14.66] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NiA9PiA4NTI3\n X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37137 invoked from network); 22 Sep 2016 12:54:21 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-14.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 22 Sep 2016 12:54:21 -0000 Received: from 172.24.1.137 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.137]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CIG48127; Thu, 22 Sep 2016 20:53:04 +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; Thu, 22 Sep 2016 20:52:57 +0800 From: z00226004 To: Date: Thu, 22 Sep 2016 20:52:28 +0800 Message-ID: <1474548753-12596-12-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1474548753-12596-1-git-send-email-zhaoshenglong@huawei.com> References: <1474548753-12596-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.0A020202.57E3D430.00E6, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: cf5242d5e290b032649a6df8431b4b9c 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 v6 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 9f26d0f..9c4005f 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;