diff mbox

[Xen-devel,v4,24/24] xen/arm64: Add ACPI support

Message ID 1456658360-16080-25-git-send-email-zhaoshenglong@huawei.com
State New
Headers show

Commit Message

Shannon Zhao Feb. 28, 2016, 11:19 a.m. UTC
From: Naresh Bhat <naresh.bhat@linaro.org>

Add ACPI support on arm64 xen hypervisor. Enable EFI support on ARM.

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
V4: add comments to explain why efi_enabled = 1 needs
---
 xen/arch/arm/Kconfig         | 1 +
 xen/common/efi/runtime.c     | 8 ++++++--
 xen/include/asm-arm/config.h | 5 +++++
 3 files changed, 12 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 60e923c..e39b05b 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -14,6 +14,7 @@  config ARM_64
 	def_bool y
 	depends on 64BIT
 	select HAS_GICV3
+	select HAS_ACPI
 
 config ARM
 	def_bool y
diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
index ae87557..26a82a7 100644
--- a/xen/common/efi/runtime.c
+++ b/xen/common/efi/runtime.c
@@ -10,8 +10,12 @@  DEFINE_XEN_GUEST_HANDLE(CHAR16);
 
 #ifndef COMPAT
 
-#ifdef CONFIG_ARM  /* Disabled until runtime services implemented */
-const bool_t efi_enabled = 0;
+#ifdef CONFIG_ARM
+/* Currently it doesn't implement runtime services on ARM, but to boot Dom0 with
+ * ACPI it needs to assign efi_enabled with 1 to get acpi_os_get_root_pointer
+ * work.
+ */
+const bool_t efi_enabled = 1;
 #else
 # include <asm/i387.h>
 # include <asm/xstate.h>
diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
index a26cb1a..98710fe 100644
--- a/xen/include/asm-arm/config.h
+++ b/xen/include/asm-arm/config.h
@@ -36,6 +36,11 @@ 
 
 #define CONFIG_ARM_L1_CACHE_SHIFT 7 /* XXX */
 
+#if defined(CONFIG_ARM_64)
+#define CONFIG_ACPI 1
+#define CONFIG_ACPI_BOOT 1
+#endif
+
 #define CONFIG_SMP 1
 
 #define CONFIG_VIDEO 1