OpenCloudOS-Kernel/arch/ia64/kernel
Magnus Damm cee87af2a5 [IA64] kexec: Use EFI_LOADER_DATA for ELF core header
The address where the ELF core header is stored is passed to the secondary
kernel as a kernel command line option.  The memory area for this header is
also marked as a separate EFI memory descriptor on ia64.

The separate EFI memory descriptor is at the moment of the type
EFI_UNUSABLE_MEMORY.  With such a type the secondary kernel skips over the
entire memory granule (config option, 16M or 64M) when detecting memory.
If we are lucky we will just lose some memory, but if we happen to have
data in the same granule (such as an initramfs image), then this data will
never get mapped and the kernel bombs out when trying to access it.

So this is an attempt to fix this by changing the EFI memory descriptor
type into EFI_LOADER_DATA.  This type is the same type used for the kernel
data and for initramfs.  In the secondary kernel we then handle the ELF
core header data the same way as we handle the initramfs image.

This patch contains the kernel changes to make this happen.  Pretty
straightforward, we reserve the area in reserve_memory().  The address for
the area comes from the kernel command line and the size comes from the
specialized EFI parsing function vmcore_find_descriptor_size().

The kexec-tools-testing code for this can be found here:
http://lists.osdl.org/pipermail/fastboot/2007-February/005983.html

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Cc: Simon Horman <horms@verge.net.au>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-06 14:50:33 -08:00
..
cpufreq ACPI: replace kmalloc+memset with kzalloc 2006-12-20 16:54:54 -05:00
Makefile [IA64] CONFIG_KEXEC/CONFIG_CRASH_DUMP permutations 2006-12-12 10:11:00 -08:00
acpi-ext.c Pull acpi_os_free into release branch 2006-07-01 17:19:08 -04:00
acpi-processor.c fix file specification in comments 2006-10-03 23:01:26 +02:00
acpi.c ACPI: IA64: react to acpi_table_parse() return value change 2007-02-16 22:07:36 -05:00
asm-offsets.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
audit.c [PATCH] audit: AUDIT_PERM support 2006-09-11 13:32:30 -04:00
brl_emu.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
crash.c [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00
crash_dump.c [IA64] kexec: Minor enhancement to includes in crash.c 2007-02-05 11:31:04 -08:00
cyclone.c [IA64] don't report !sn2 or !summit hardware as an error 2006-03-07 15:26:49 -08:00
efi.c [IA64] kexec: Use EFI_LOADER_DATA for ELF core header 2007-03-06 14:50:33 -08:00
efi_stub.S [IA64] make efi_stub.S fit in 80 cols 2006-06-21 14:35:28 -07:00
entry.S [IA64] Hook up getcpu system call for IA64 2007-02-05 16:56:36 -08:00
entry.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
esi.c [IA64] esi-support 2006-06-21 11:19:22 -07:00
esi_stub.S [IA64] esi-support 2006-06-21 11:19:22 -07:00
fsys.S [IA64] cleanup in fsys.S 2006-02-28 08:53:32 -08:00
gate-data.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gate.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
gate.lds.S [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
head.S [IA64] Save register stack contents on cpu start 2006-09-08 11:05:13 -07:00
ia64_ksyms.c [IA64] Need export for csum_ipv6_magic 2006-12-07 13:18:57 -08:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
iosapic.c [IA64] Clear IRQ affinity when unregistered 2007-02-05 14:09:51 -08:00
irq.c [PATCH] kexec: Avoid migration of already disabled irqs (ia64) 2007-02-03 11:26:06 -08:00
irq_ia64.c [PATCH] Scheduled removal of SA_xxx interrupt flags fixups 2007-02-14 08:09:54 -08:00
irq_lsapic.c [IA64] typename -> name conversion 2006-11-16 09:38:02 -08:00
ivt.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
jprobes.S [IA64] enable trap code on slot 1 2006-12-12 12:00:55 -08:00
kprobes.c [IA64] kprobe clears qp bits for special instructions 2006-12-12 12:04:42 -08:00
machine_kexec.c [IA64] Fix NULL-pointer dereference in ia64_machine_kexec() 2007-02-05 14:06:44 -08:00
machvec.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
mca.c [IA64] CONFIG_KEXEC/CONFIG_CRASH_DUMP permutations 2006-12-12 10:11:00 -08:00
mca_asm.S [IA64] ar.fpsr not set on MCA/INIT kernel entry 2006-09-26 15:20:35 -07:00
mca_drv.c [IA64] MCA recovery: Montecito support 2006-10-31 14:30:34 -08:00
mca_drv.h [IA64] printing support for MCA/INIT 2006-09-26 14:44:37 -07:00
mca_drv_asm.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
minstate.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
module.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
msi_ia64.c [PATCH] irq: Remove set_native_irq_info 2007-02-26 10:34:07 -08:00
numa.c [PATCH] cpumask: export node_to_cpu_mask consistently 2006-10-02 07:57:17 -07:00
pal.S [IA64] reformat pal.S to fit in 80 columns, fix typos 2006-10-17 14:54:19 -07:00
palinfo.c Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-12-07 15:39:22 -08:00
patch.c [IA64] add init declaration - gate page functions 2006-03-22 16:54:38 -08:00
perfmon.c [IA64] permon use-after-free fix 2007-03-06 14:49:52 -08:00
perfmon_default_smpl.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
perfmon_generic.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
perfmon_itanium.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
perfmon_mckinley.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
perfmon_montecito.h [IA64] sparse cleanups 2006-12-07 10:48:19 -08:00
process.c [IA64] kexec: Move machine_shutdown from machine_kexec.c to process.c 2007-02-05 13:49:10 -08:00
ptrace.c [IA64] find thread for user rbs address 2007-02-05 14:04:21 -08:00
relocate_kernel.S [IA64] IA64 Kexec/kdump 2006-12-07 09:51:35 -08:00
sal.c [PATCH] Dynamic kernel command-line: fixups 2007-02-12 09:48:39 -08:00
salinfo.c [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
semaphore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup.c [IA64] kexec: Use EFI_LOADER_DATA for ELF core header 2007-03-06 14:50:33 -08:00
sigframe.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
signal.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
smp.c [PATCH] arch/ia64: ansify 2007-02-09 09:14:06 -08:00
smpboot.c WorkQueue: Fix up arch-specific work items where possible 2006-12-05 19:36:26 +00:00
sys_ia64.c [PATCH] IA64,sparc: local DoS with corrupted ELFs 2006-09-08 08:40:46 -07:00
time.c [IA64] - Allow IPIs in timer loop 2006-10-17 14:51:49 -07:00
topology.c [PATCH] i386: change the 'no_control' field to 'hotpluggable' in the struct cpu 2006-12-07 02:14:10 +01:00
traps.c [PATCH] Consolidate bust_spinlocks() 2007-02-11 10:51:34 -08:00
unaligned.c [IA64] sysctl option to silence unaligned trap warnings 2006-02-28 09:42:23 -08:00
uncached.c [PATCH] Define easier to handle GFP_THISNODE 2006-09-26 08:48:50 -07:00
unwind.c [IA64] MCA/INIT: remove obsolete unwind code 2005-09-11 14:09:34 -07:00
unwind_decoder.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
unwind_i.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vmlinux.lds.S [PATCH] disable init/initramfs.c: architectures 2007-02-11 10:51:25 -08:00