xen-ia64-devel
[Xen-ia64-devel] [patch 13/15] 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@xxxxxxxxxxxx>
---
I will post a fresh series of patches shortly - I have to run to a meeting
soon, but I'm pretty excited about this and wanted to get it out there.
I have found that the following patches works on HP rx2620, HP 2600
and Tiger 2.
* The "ia64: kexec: Map EFI memory in the same location as Linux" series
of 15 patches that I posed to xen-ia64-devel on the 4th March.
http://lists.xensource.com/archives/html/xen-ia64-devel/2008-03/msg00020.html
* Omit patch 13/15
"ia64: kexec: Set page size identity mapping of EFI in alt_itlb_miss"
This patch causes problems on machines that it is supposed to
fix problems on - obviously I made a mistake when collating fixes.
* Optionally omit the following patches, as they don't seem to be used,
although they don't seem to cause much harm either.
09/15 "ia64: kexec: Add identity mapping of EFI memory to dtlb_miss"
10/15 "ia64: kexec: identity mapping of EFI memory to itlb_miss"
11/15 "ia64: kexec: Set protection key of identity mapping of EFI in
alt_dtlb_miss"
12/15 "ia64: kexec: Set protection key of identity mapping of EFI in
alt_itlb_miss"
* Add this patch
Special thanks to Alex Williamson for giving me access to an
HP rx2620 so that I could debug this problem.
Mon, 14 Jul 2008 21:41:34 +1000
* Cast result to void to get rid of warnings.
Thanks to Yamahata-san
Tue, 15 Jul 2008 10:13:45 +1000
* Handle PAL memory usng __va_efi in a separate patch
Index: xen-unstable.hg/xen/arch/ia64/linux-xen/sal.c
===================================================================
--- xen-unstable.hg.orig/xen/arch/ia64/linux-xen/sal.c 2008-07-15
09:47:16.000000000 +1000
+++ xen-unstable.hg/xen/arch/ia64/linux-xen/sal.c 2008-07-15
10:01:25.000000000 +1000
@@ -121,8 +121,8 @@ static void __init
sal_desc_entry_point (void *p)
{
struct ia64_sal_desc_entry_point *ep = p;
- ia64_pal_handler_init(__va(ep->pal_proc));
- ia64_sal_handler_init(__va(ep->sal_proc), __va(ep->gp));
+ ia64_pal_handler_init(__va_efi(ep->pal_proc));
+ ia64_sal_handler_init(__va_efi(ep->sal_proc), __va_efi(ep->gp));
}
#ifdef CONFIG_SMP
Index: xen-unstable.hg/xen/include/asm-ia64/xenpage.h
===================================================================
--- xen-unstable.hg.orig/xen/include/asm-ia64/xenpage.h 2008-07-15
09:47:16.000000000 +1000
+++ xen-unstable.hg/xen/include/asm-ia64/xenpage.h 2008-07-15
10:23:42.000000000 +1000
@@ -97,5 +97,14 @@ static inline u64 pa_clear_uc(u64 paddr)
/* It is sometimes very useful to have unsigned long as result. */
#define __va_ul(x) ({xen_va _v; _v.l = (long) (x); _v.f.reg = -1; _v.l;})
+/* __va_efi() should just call __va() until the use of
+ * __IA64_EFI_CACHED_OFFSET is activated in efi_enter_virtual_mode()
+ */
+#if 0
+#define __va_efi(x) ((void*)((unsigned long)(x) | __IA64_EFI_CACHED_OFFSET))
+#else
+#define __va_efi(x) __va(x)
+#endif
+
#endif
#endif /* _ASM_IA64_XENPAGE_H */
--
--
Horms
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-ia64-devel] [patch 02/15] ia64: kexec: define EFI offsets for identity mapping, (continued)
- [Xen-ia64-devel] [patch 02/15] ia64: kexec: define EFI offsets for identity mapping, Simon Horman
- [Xen-ia64-devel] [patch 04/15] ia64: kexec: Unpin the correct VHPT TR in ia64_do_tlb_purge, Simon Horman
- [Xen-ia64-devel] [patch 03/15] ia64: kexec: Add a wrapper to vmx_switch_rr7(), Simon Horman
- [Xen-ia64-devel] [patch 10/15] ia64: kexec: Handle EFI UC area correctly in vmx_alt_dtlb, Simon Horman
- [Xen-ia64-devel] [patch 08/15] ia64: kexec: Allow EFI_RID to be used in ivt.S, Simon Horman
- [Xen-ia64-devel] [patch 01/15] ia64: kexec: Define macros for EFI RID, Simon Horman
- [Xen-ia64-devel] [patch 09/15] ia64: kexec: Add identity mapping of EFI memory to alt_dtlb_miss, Simon Horman
- [Xen-ia64-devel] [patch 06/15] ia64: kexec: Header changes in preparation for EFI RID, Simon Horman
- [Xen-ia64-devel] [patch 05/15] ia64: kexec: Unpin shared_info, mapped_regs and VPD TR in ia64_do_tlb_purge, Simon Horman
- [Xen-ia64-devel] [patch 07/15] ia64: kexec: Repining for EFI RID, Simon Horman
- [Xen-ia64-devel] [patch 13/15] ia64: kexec: add __va_efi,
Simon Horman <=
- [Xen-ia64-devel] [patch 15/15] ia64: kexec: Map EFI regions into the same place they are maped into in Linux, Simon Horman
- [Xen-ia64-devel] [patch 12/15] ia64: kexec: Use a separate RID for EFI, Simon Horman
- [Xen-ia64-devel] [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls, Simon Horman
- [Xen-ia64-devel] Re: [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls, Isaku Yamahata
- [Xen-ia64-devel] Re: [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls, Isaku Yamahata
- [Xen-ia64-devel] Re: [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls, Simon Horman
- Re: [Xen-ia64-devel] Re: [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls, Simon Horman
- Re: [Xen-ia64-devel] Re: [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls, Isaku Yamahata
- Re: [Xen-ia64-devel] Re: [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls, Simon Horman
- Re: [Xen-ia64-devel] Re: [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls, Simon Horman
|
|
|