ia64/xen-unstable

changeset 17840:4ebd8f377426

[IA64] re-add 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@valinux.co.jp>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 12 15:44:21 2008 +0100 (2008-06-12)
parents 0089fe3d209d
children 5e98eb873e13
files xen/drivers/acpi/osl.c xen/include/asm-ia64/config.h
line diff
     1.1 --- a/xen/drivers/acpi/osl.c	Thu Jun 12 15:42:09 2008 +0100
     1.2 +++ b/xen/drivers/acpi/osl.c	Thu Jun 12 15:44:21 2008 +0100
     1.3 @@ -37,6 +37,9 @@
     1.4  #include <acpi/platform/aclinux.h>
     1.5  #include <xen/spinlock.h>
     1.6  #include <xen/domain_page.h>
     1.7 +#ifdef __ia64__
     1.8 +#include <linux/efi.h>
     1.9 +#endif
    1.10  
    1.11  #define _COMPONENT		ACPI_OS_SERVICES
    1.12  ACPI_MODULE_NAME("osl")
    1.13 @@ -82,9 +85,25 @@ void acpi_os_vprintf(const char *fmt, va
    1.14  
    1.15  acpi_physical_address __init acpi_os_get_root_pointer(void)
    1.16  {
    1.17 -	acpi_physical_address pa = 0;
    1.18 -	acpi_find_root_pointer(&pa);
    1.19 -	return pa;
    1.20 +#ifdef __ia64__
    1.21 +	if (efi_enabled) {
    1.22 +		if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
    1.23 +			return efi.acpi20;
    1.24 +		else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
    1.25 +			return efi.acpi;
    1.26 +		else {
    1.27 +			printk(KERN_ERR PREFIX
    1.28 +			       "System description tables not found\n");
    1.29 +			return 0;
    1.30 +		}
    1.31 +	} else
    1.32 +#endif
    1.33 +	{
    1.34 +		acpi_physical_address pa = 0;
    1.35 +
    1.36 +		acpi_find_root_pointer(&pa);
    1.37 +		return pa;
    1.38 +	}
    1.39  }
    1.40  
    1.41  void __iomem *
     2.1 --- a/xen/include/asm-ia64/config.h	Thu Jun 12 15:42:09 2008 +0100
     2.2 +++ b/xen/include/asm-ia64/config.h	Thu Jun 12 15:44:21 2008 +0100
     2.3 @@ -17,6 +17,7 @@
     2.4  // this needs to be on to run on system with large memory hole
     2.5  #define	CONFIG_VIRTUAL_FRAME_TABLE
     2.6  
     2.7 +#define CONFIG_EFI
     2.8  #define CONFIG_EFI_PCDP
     2.9  #define CONFIG_SERIAL_SGI_L1_CONSOLE
    2.10