From patchwork Thu Mar 17 09:41: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: 8608921 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB0159FD29 for ; Thu, 17 Mar 2016 09:48:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3AAA201CD for ; Thu, 17 Mar 2016 09:48:34 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A004202FE for ; Thu, 17 Mar 2016 09:48:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agUVo-0006Y8-S2; Thu, 17 Mar 2016 09:46:36 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agUVn-0006Xk-Qz for xen-devel@lists.xen.org; Thu, 17 Mar 2016 09:46:35 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 67/13-25417-BFC7AE65; Thu, 17 Mar 2016 09:46:35 +0000 X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-14.tower-206.messagelabs.com!1458207991!29335349!1 X-Originating-IP: [119.145.14.65] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NSA9PiA3NzQ2Mw==\n X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 36253 invoked from network); 17 Mar 2016 09:46:34 -0000 Received: from szxga02-in.huawei.com (HELO szxga02-in.huawei.com) (119.145.14.65) by server-14.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 17 Mar 2016 09:46:34 -0000 Received: from 172.24.1.49 (EHLO szxeml432-hub.china.huawei.com) ([172.24.1.49]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DDR51898; Thu, 17 Mar 2016 17:43:04 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml432-hub.china.huawei.com (10.82.67.209) with Microsoft SMTP Server id 14.3.235.1; Thu, 17 Mar 2016 17:41:50 +0800 From: Shannon Zhao To: Date: Thu, 17 Mar 2016 17:41:08 +0800 Message-ID: <1458207668-12012-23-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1458207668-12012-1-git-send-email-zhaoshenglong@huawei.com> References: <1458207668-12012-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.56EA7C28.0167, 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: b2ac279c997c76570d7f106efdc879f4 Cc: peter.huangpeng@huawei.com, julien.grall@arm.com, stefano.stabellini@citrix.com, shannon.zhao@linaro.org, Jan Beulich , zhaoshenglong@huawei.com Subject: [Xen-devel] [PATCH v6 22/22] xen/arm64: Add ACPI support 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" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Naresh Bhat Add ACPI support on arm64 xen hypervisor. Enable EFI support on ARM. Cc: Jan Beulich Signed-off-by: Shannon Zhao Acked-by: Jan Beulich Reviewed-by: Stefano Stabellini --- v6: make CONFIG_ACPI depends on EXPERT --- xen/arch/arm/Kconfig | 9 +++++++++ xen/common/efi/runtime.c | 12 +++++++----- xen/include/asm-arm/config.h | 4 ++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index cb99df5..6231cd5 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -33,6 +33,15 @@ menu "Architecture Features" source "arch/Kconfig" +config ACPI + bool + prompt "ACPI (Advanced Configuration and Power Interface) Support" if EXPERT = "y" + depends on ARM_64 + ---help--- + + Advanced Configuration and Power Interface (ACPI) support for Xen is + an alternative to device tree on ARM64. + # Select HAS_GICV3 if GICv3 is supported config HAS_GICV3 bool diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c index ae87557..c256814 100644 --- a/xen/common/efi/runtime.c +++ b/xen/common/efi/runtime.c @@ -10,14 +10,16 @@ DEFINE_XEN_GUEST_HANDLE(CHAR16); #ifndef COMPAT -#ifdef CONFIG_ARM /* Disabled until runtime services implemented */ -const bool_t efi_enabled = 0; -#else +/* + * Currently runtime services are not implemented on ARM. To boot Xen with ACPI, + * set efi_enabled to 1, so that Xen can get the ACPI root pointer from EFI. + */ +const bool_t efi_enabled = 1; + +#ifndef CONFIG_ARM # include # include # include - -const bool_t efi_enabled = 1; #endif unsigned int __read_mostly efi_num_ct; diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index 7ceb5c5..5fc9aa2 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -31,6 +31,10 @@ #define CONFIG_ARM_L1_CACHE_SHIFT 7 /* XXX */ +#ifdef CONFIG_ACPI +#define CONFIG_ACPI_BOOT 1 +#endif + #define CONFIG_SMP 1 #define CONFIG_IRQ_HAS_MULTIPLE_ACTION 1