[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] fix acpi_os_get_root_pointer() broken by 17814:9af7a535225f



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1213241021 -32400
# Node ID d84baff75387166913985a705b5ea91e909406b3
# Parent  b477fb2022639b1e7d9832d6433e234176d5fb6f
[IA64] readd efi support to acpi_os_get_root_pointer()

On ia64 RSDP address is obtained from efi table instead of
memory scan. Otherwise it may use wrong table to fail to find
tables.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff --git a/xen/drivers/acpi/osl.c b/xen/drivers/acpi/osl.c
--- a/xen/drivers/acpi/osl.c
+++ b/xen/drivers/acpi/osl.c
@@ -37,6 +37,9 @@
 #include <acpi/platform/aclinux.h>
 #include <xen/spinlock.h>
 #include <xen/domain_page.h>
+#ifdef __ia64__
+#include <linux/efi.h>
+#endif
 
 #define _COMPONENT             ACPI_OS_SERVICES
 ACPI_MODULE_NAME("osl")
@@ -82,9 +85,25 @@
 
 acpi_physical_address __init acpi_os_get_root_pointer(void)
 {
-       acpi_physical_address pa = 0;
-       acpi_find_root_pointer(&pa);
-       return pa;
+#ifdef __ia64__
+       if (efi_enabled) {
+               if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
+                       return efi.acpi20;
+               else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
+                       return efi.acpi;
+               else {
+                       printk(KERN_ERR PREFIX
+                              "System description tables not found\n");
+                       return 0;
+               }
+       } else
+#endif
+       {
+               acpi_physical_address pa = 0;
+
+               acpi_find_root_pointer(&pa);
+               return pa;
+       }
 }
 
 void __iomem *
diff --git a/xen/include/asm-ia64/config.h b/xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h
+++ b/xen/include/asm-ia64/config.h
@@ -17,6 +17,7 @@
 // this needs to be on to run on system with large memory hole
 #define        CONFIG_VIRTUAL_FRAME_TABLE
 
+#define CONFIG_EFI
 #define CONFIG_EFI_PCDP
 #define CONFIG_SERIAL_SGI_L1_CONSOLE
 


-- 
yamahata

Attachment: 2-fix-acpi_os_get_root_pointer.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.