From patchwork Tue May 31 04:43:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 68864 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1727793qge; Mon, 30 May 2016 21:50:35 -0700 (PDT) X-Received: by 10.176.7.73 with SMTP id h67mr16004507uah.91.1464670235426; Mon, 30 May 2016 21:50:35 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id n5si13038818uan.87.2016.05.30.21.50.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 21:50:35 -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 1b7bcT-0008OE-Se; Tue, 31 May 2016 04:49:33 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7bcT-0008NS-57 for xen-devel@lists.xen.org; Tue, 31 May 2016 04:49:33 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 0A/D2-06230-CD71D475; Tue, 31 May 2016 04:49:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsVSPpHPSfeOuG+ 4QeMWDoslHxezODB6HN39mymAMYo1My8pvyKBNaPn8k22gvXcFR8azrE0MK7k7GLk5BASOMMo MWFVbhcjF5C9h1Fi7uf9bCAJNgFdiY8bp7CD2CICshKru+awgxQxC2xilGj7cpEFJCEsYC1x7 +IesAYWAVWJ4/2TgGwODl4BD4nft81BwhICGhIreyeAlXMKeEqcn/iSGWKxh8S+ZacZQWxeAU GJkzOfgNUwC0hIHHzxghmiV1Gibf1JNghbUuLgihssIDdICJxilHh84z4LRMJU4vL5x8wTGAV nIZk1C8msBYxMqxjVi1OLylKLdI30kooy0zNKchMzc3QNDcz0clOLixPTU3MSk4r1kvNzNzEC w5MBCHYwLvvrdIhRkoNJSZTX6rdPuBBfUn5KZUZicUZ8UWlOavEhRhkODiUJ3ptivuFCgkWp6 akVaZk5wEiBSUtw8CiJ8CoBo0WIt7ggMbc4Mx0idYpRUUqcdwFInwBIIqM0D64NFp2XGGWlhH kZgQ4R4ilILcrNLEGVf8UozsGoJMy7FWQKT2ZeCdz0V0CLmYAWx2f4gCwuSURISTUwumsvmb5 Zb9eMT99jDL7KzJ8ds0jnmOGitVG3106SVJGXXHHn7bQE4b3P+x6f/ji/wLCuTEqdr8yn7t2Z M79+sLMfKMkOzXyydm6UbAPL7HNRUe+VXutr/kq3rD/ANLWBM8VaevPV7qs1h6zvx5xqmm/zx V5UZWrFZuNVLTO8WPRP3Kk33HRwmxJLcUaioRZzUXEiADybF9bJAgAA X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1464670167!16612509!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.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29809 invoked from network); 31 May 2016 04:49:31 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-5.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 31 May 2016 04:49:31 -0000 Received: from 172.24.1.137 (EHLO szxeml428-hub.china.huawei.com) ([172.24.1.137]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CCK66907; Tue, 31 May 2016 12:44:48 +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.235.1; Tue, 31 May 2016 12:44:37 +0800 From: Shannon Zhao To: Date: Tue, 31 May 2016 12:43:29 +0800 Message-ID: <1464669816-11476-8-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1464669816-11476-1-git-send-email-zhaoshenglong@huawei.com> References: <1464669816-11476-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.0A020205.574D170C.0003, 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: 9d01311be4757db160b9e26fd95b2545 Cc: sstabellini@kernel.org, ian.jackson@eu.citrix.com, peter.huangpeng@huawei.com, julien.grall@arm.com, shannon.zhao@linaro.org, wei.liu2@citrix.comg Subject: [Xen-devel] [PATCH 07/14] 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 Currently there is only the table header in DSDT table. Signed-off-by: Shannon Zhao --- tools/libxl/libxl_arm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index c3b8fb4..7949635 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -944,6 +944,20 @@ static void make_acpi_fadt(libxl__gc *gc, struct xc_dom_image *dom) dom->acpitable_size += dom->acpitable_blob->fadt.size; } +static void make_acpi_dsdt(libxl__gc *gc, struct xc_dom_image *dom) +{ + struct acpi_table_header *dsdt; + + /* Currently there is only the table header in DSDT table. */ + dsdt = libxl__zalloc(gc, sizeof(*dsdt)); + make_acpi_header((void *)dsdt, "DSDT", sizeof(*dsdt), 2); + + dom->acpitable_blob->dsdt.table = (void *)dsdt; + /* Align to 64bit. */ + dom->acpitable_blob->dsdt.size = ROUNDUP(sizeof(*dsdt), 3); + dom->acpitable_size += ROUNDUP(dom->acpitable_blob->dsdt.size, 3); +} + static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, libxl__domain_build_state *state, struct xc_dom_image *dom) @@ -966,6 +980,7 @@ static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, make_acpi_gtdt(gc, dom); make_acpi_fadt(gc, dom); + make_acpi_dsdt(gc, dom); return 0; }