|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
[Xen-ia64-devel] [patch 10/12] Kexec: Map runtime EFI regions the same w
Map EFI regions into the same place they are maped into in Linux.
This is because of an unfortunate problem with the way that
EFI interacts with Kexec. The call to map the EFI regions
may only be made once. This means that after Kexec the EFI
regions must be mapped into the same region that they
were mapped into prior to Kexec.
This is not
usually a problem when kexecing from xen to xen or from linux to linux,
as the mapping will be the same. However when kexecing from xen to linux
or linux to xen, the mapping is different, and the problem manifests.
So far Magnus Damm and I have come up with three different ideas for
resolving this problem.
1. Leave the EFI in physical mode
- This is nice and simple
- There is a potential performance hit, but PAL calls are not
made very often, so it shouldn't be a problem
- I have patches to do this, some of which are in the
series that accompany this patch.
- The SGI people tell me that it won't work on SN because
it allows the OS to provide EFI (or SAL?) code.
2. Always map EFI into the space that Linux uses
- Not so simple
- Requires Xen to jump through some hoops
- But leaves Linux unmodified
- But it will break if Linux ever changes its mapping
- This patch series implements this change
3. Always map EFI to some agreed space
- Similar to 2. but less likely to break in the future
- But it requires Xen and Linux to agree on a space to be used
- Reqires both Xen and Linux to be modified
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
Index: xen-unstable.hg/xen/arch/ia64/linux-xen/efi.c
===================================================================
--- xen-unstable.hg.orig/xen/arch/ia64/linux-xen/efi.c 2007-09-11
12:07:21.000000000 +0900
+++ xen-unstable.hg/xen/arch/ia64/linux-xen/efi.c 2007-09-11
15:23:29.000000000 +0900
@@ -629,6 +629,17 @@ efi_enter_virtual_mode (void)
for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
md = p;
+#ifdef XEN
+ if (md->attribute & EFI_MEMORY_RUNTIME) {
+ if (md->attribute & EFI_MEMORY_WB)
+ md->virt_addr = __IA64_EFI_CACHED_OFFSET|
+ md->phys_addr;
+ else if (md->attribute & (EFI_MEMORY_UC|EFI_MEMORY_WC|
+ EFI_MEMORY_WT))
+ md->virt_addr = __IA64_EFI_UNCACHED_OFFSET|
+ md->phys_addr;
+ }
+#else
if (md->attribute & EFI_MEMORY_RUNTIME) {
/*
* Some descriptors have multiple bits set, so the
order of
@@ -661,6 +672,7 @@ efi_enter_virtual_mode (void)
#endif
}
}
+#endif
}
if ((unsigned long)__va(runtime->set_virtual_address_map) ==
--
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
_______________________________________________
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 00/12] Kexec v20070927: Xen, Simon Horman
- [Xen-ia64-devel] [patch 02/12] Kdump: Save dom0_mm_pgd_mfn in vmcore on ia64, Simon Horman
- [Xen-ia64-devel] [patch 03/12] Kexec: Add kexec_disable_iosapic, Simon Horman
- [Xen-ia64-devel] [patch 11/12] Kexec: Handle alt_dtlb_miss for EFI in assembly, Simon Horman
- [Xen-ia64-devel] [patch 06/12] Kexec: Fix ia64_do_tlb_purge so that it works with XEN, Simon Horman
- [Xen-ia64-devel] [patch 04/12] Kexec: partial port of CPU_HOTPLUG, Simon Horman
- [Xen-ia64-devel] [patch 08/12] Kexec: offsets for EFI runtime regions, Simon Horman
- [Xen-ia64-devel] [patch 12/12] Kexec: Implement elf_core_save_regs(), Simon Horman
- [Xen-ia64-devel] [patch 10/12] Kexec: Map runtime EFI regions the same way as Linux,
Simon Horman <=
- [Xen-ia64-devel] [patch 07/12] Kexec: Zap VHPT in relocate_kernel, Simon Horman
- [Xen-ia64-devel] [patch 01/12] kexec for xen, Simon Horman
- [Xen-ia64-devel] [patch 12/16] Date: Thu, 12 Jul 2007 15:50:37 +0900 Subkect: Kexec: machine addresss macros From: Simon Horman <horms@xxxxxxxxxxxx>, Simon Horman
- [Xen-ia64-devel] [patch 13/16] Kdump: Use the machine address for the boot params region, Simon Horman
- [Xen-ia64-devel] [patch 05/12] Kexec: Save the MADT ACPI tables so that they can be restored, Simon Horman
- [Xen-ia64-devel] [patch 09/12] Kexec: Allow page fault handler to handle EFI regions, Simon Horman
- [Xen-ia64-devel] [patch 2/2] Set alternate location for /proc/iomem on ia64 xen, Simon Horman
- [Xen-devel] [patch 01/16] sysctl: implement CTL_UNNUMBERED, Simon Horman
|
|
|
|
|