ia64/xen-unstable

changeset 18093:54060aec0dc1

[IA64] kexec: add __va_efi

sal_desc_entry_point() converts physical addresses into virtual
addresses using __va() and these virtual addresses are used
to register the SAL and PAL handlers - which exist in firmware
memory.

As the mapping of firmware memory is being moved from
a PAGE_OFFSET of (0xf << 60) to a PAGE_OFFSET of (0xe << 60),
__va() does not provide the correct virtual address.

By adding __va_efi(), which uses EFI_PAGE_OFFSET=(0xe << 60),
and using this in sal_desc_entry_point(), the correct address is
used.

On an HP rx2600 this eliminates the problem where the SAL rendezvous address
can't be registered and subsequently the boot fails. I suspect it
solves similar problems that have been seen on other HP machines too.

Actually, its rather amazing that the HP rx2620 and Tiger2 that
I have been using work without this fix.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Tue Jul 22 12:15:02 2008 +0900 (2008-07-22)
parents fb5cfb8b122e
children 7da7b53b2139
files xen/arch/ia64/linux-xen/sal.c xen/include/asm-ia64/xenpage.h
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/sal.c	Tue Jul 22 12:15:02 2008 +0900
     1.2 +++ b/xen/arch/ia64/linux-xen/sal.c	Tue Jul 22 12:15:02 2008 +0900
     1.3 @@ -121,8 +121,8 @@ static void __init
     1.4  sal_desc_entry_point (void *p)
     1.5  {
     1.6  	struct ia64_sal_desc_entry_point *ep = p;
     1.7 -	ia64_pal_handler_init(__va(ep->pal_proc));
     1.8 -	ia64_sal_handler_init(__va(ep->sal_proc), __va(ep->gp));
     1.9 +	ia64_pal_handler_init(__va_efi(ep->pal_proc));
    1.10 +	ia64_sal_handler_init(__va_efi(ep->sal_proc), __va_efi(ep->gp));
    1.11  }
    1.12  
    1.13  #ifdef CONFIG_SMP
     2.1 --- a/xen/include/asm-ia64/xenpage.h	Tue Jul 22 12:15:02 2008 +0900
     2.2 +++ b/xen/include/asm-ia64/xenpage.h	Tue Jul 22 12:15:02 2008 +0900
     2.3 @@ -97,5 +97,14 @@ static inline u64 pa_clear_uc(u64 paddr)
     2.4  /* It is sometimes very useful to have unsigned long as result.  */
     2.5  #define __va_ul(x)	({xen_va _v; _v.l = (long) (x); _v.f.reg = -1; _v.l;})
     2.6  
     2.7 +/* __va_efi() should just call __va() until the use of
     2.8 + * __IA64_EFI_CACHED_OFFSET is activated in efi_enter_virtual_mode()
     2.9 + */
    2.10 +#if 0
    2.11 +#define __va_efi(x)	((void*)((unsigned long)(x) | __IA64_EFI_CACHED_OFFSET))
    2.12 +#else
    2.13 +#define __va_efi(x)	__va(x)
    2.14 +#endif
    2.15 +
    2.16  #endif
    2.17  #endif /* _ASM_IA64_XENPAGE_H */