kernel-ark/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-ext.c
acpi-processor.c
acpi.c ACPI: IA64: react to acpi_table_parse() return value change 2007-02-16 22:07:36 -05:00
asm-offsets.c
audit.c
brl_emu.c
crash_dump.c [IA64] kexec: Minor enhancement to includes in crash.c 2007-02-05 11:31:04 -08:00
crash.c [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00
cyclone.c
efi_stub.S
efi.c [IA64] kexec: Use EFI_LOADER_DATA for ELF core header 2007-03-06 14:50:33 -08:00
entry.h
entry.S [IA64] Hook up getcpu system call for IA64 2007-02-05 16:56:36 -08:00
esi_stub.S
esi.c
fsys.S
gate-data.S
gate.lds.S
gate.S
head.S
ia64_ksyms.c
init_task.c
iosapic.c [IA64] Clear IRQ affinity when unregistered 2007-02-05 14:09:51 -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
irq.c [PATCH] kexec: Avoid migration of already disabled irqs (ia64) 2007-02-03 11:26:06 -08:00
ivt.S
jprobes.S
kprobes.c
machine_kexec.c [IA64] Fix NULL-pointer dereference in ia64_machine_kexec() 2007-02-05 14:06:44 -08:00
machvec.c
Makefile
mca_asm.S
mca_drv_asm.S
mca_drv.c
mca_drv.h
mca.c
minstate.h
module.c
msi_ia64.c [PATCH] irq: Remove set_native_irq_info 2007-02-26 10:34:07 -08:00
numa.c
pal.S
palinfo.c
patch.c
perfmon_default_smpl.c
perfmon_generic.h
perfmon_itanium.h
perfmon_mckinley.h
perfmon_montecito.h
perfmon.c [IA64] permon use-after-free fix 2007-03-06 14:49:52 -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
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
setup.c [IA64] kexec: Use EFI_LOADER_DATA for ELF core header 2007-03-06 14:50:33 -08:00
sigframe.h
signal.c
smp.c [PATCH] arch/ia64: ansify 2007-02-09 09:14:06 -08:00
smpboot.c
sys_ia64.c
time.c
topology.c
traps.c [PATCH] Consolidate bust_spinlocks() 2007-02-11 10:51:34 -08:00
unaligned.c
uncached.c
unwind_decoder.c
unwind_i.h
unwind.c
vmlinux.lds.S [PATCH] disable init/initramfs.c: architectures 2007-02-11 10:51:25 -08:00