[IA64] re-add efi support to acpi_os_get_root_pointer()
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Jun 2008 14:44:21 +0000 (15:44 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Jun 2008 14:44:21 +0000 (15:44 +0100)
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@valinux.co.jp>
xen/drivers/acpi/osl.c
xen/include/asm-ia64/config.h

index 14eb6951273cec107e8b9896f9c22d59ea7c7cd0..07d69aeba08b2491d6cfffd167cd43632cd0ca16 100644 (file)
@@ -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 @@ void acpi_os_vprintf(const char *fmt, va_list args)
 
 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 *
index 92411d2a7afc2472740f54dfa894e65fa3618218..dc557bfca3320d44b366a226a59dbd44c97ea683 100644 (file)
@@ -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