kernel-ark/include/asm-ia64
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
..
sn Altix: ACPI SSDT PCI device support 2007-02-02 22:14:35 -05:00
a.out.h
acpi-ext.h [IA64] update HP CSR space discovery via ACPI 2006-04-06 14:42:38 -07:00
acpi.h ACPICA: Allow ACPI id to be u32 instead of u8. 2007-02-02 21:14:31 -05:00
agp.h
asmmacro.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
atomic.h [PATCH] atomic: add_unless cmpxchg optimise 2006-03-23 07:38:17 -08:00
auxvec.h
bitops.h [IA64] remove asm-ia64/bitops.h self-inclusion 2006-05-05 11:37:15 -07:00
break.h [IA64] enable trap code on slot 1 2006-12-12 12:00:55 -08:00
bug.h [PATCH] remove gcc-2 checks 2006-01-08 20:14:02 -08:00
bugs.h
byteorder.h
cache.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
cacheflush.h [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
checksum.h [PATCH] fix prototype of csum_ipv6_magic() (ia64) 2007-01-23 11:09:49 -08:00
compat.h [PATCH] ia64: add ptr_to_compat() 2006-03-27 08:44:48 -08:00
cpu.h
cputime.h
current.h
cyclone.h
delay.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
device.h ACPI: Change ACPI to use dev_archdata instead of firmware_data 2006-12-01 14:52:01 -08:00
div64.h
dma-mapping.h [PATCH] ia64: fix noncoherent DMA API so devres builds 2007-02-14 08:09:51 -08:00
dma.h [IA64] swiotlb bug fixes 2007-02-05 18:46:40 -08:00
dmi.h [PATCH] ia64: use i386 dmi_scan.c 2006-03-26 08:56:54 -08:00
elf.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
emergency-restart.h
errno.h
esi.h [IA64] remove bogus prototype ia64_esi_init() 2007-02-05 14:14:29 -08:00
fcntl.h
fpswa.h
fpu.h
futex.h [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
gcc_intrin.h
hardirq.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
hw_irq.h [PATCH] genirq: add ->retrigger() irq op to consolidate hw_irq_resend() 2006-06-29 10:26:23 -07:00
ia32.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ia64regs.h
ide.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
intel_intrin.h [IA64] use icc defined constant 2006-02-07 08:49:27 -08:00
intrinsics.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
io.h Altix: Add initial ACPI IO support 2006-12-01 14:36:57 -08:00
ioctl.h [PATCH] Generic ioctl.h 2006-01-10 08:01:34 -08:00
ioctls.h
iosapic.h
ipcbuf.h
irq_regs.h IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
irq.h [PATCH] genirq ia64 cleanup 2006-07-03 15:26:58 -07:00
Kbuild [PATCH] cleanup asm/setup.h userspace visibility 2006-12-07 08:39:46 -08:00
kdebug.h [PATCH] Notify page fault call chain for ia64 2006-06-26 09:58:22 -07:00
kexec.h Storage class should be before const qualifier 2007-02-17 20:11:19 +01:00
kmap_types.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
kprobes.h [IA64] enable trap code on slot 1 2006-12-12 12:00:55 -08:00
kregs.h
libata-portmap.h ATA convert GSI to irq on ia64 2007-02-15 18:04:53 -05:00
linkage.h [PATCH] abstract type/size specification for assembly 2006-03-24 07:33:25 -08:00
local.h [IA64] Fix missing parameter for local_add/sub 2005-12-07 11:30:11 -08:00
machvec_dig.h [IA64] cleanup dig_irq_init 2006-03-24 13:12:46 -08:00
machvec_hpsim.h
machvec_hpzx1_swiotlb.h
machvec_hpzx1.h
machvec_init.h
machvec_sn2.h [IA64] IA64 Kexec/kdump 2006-12-07 09:51:35 -08:00
machvec.h msi: Make MSI useable more architectures 2007-02-07 15:50:08 -08:00
mc146818rtc.h
mca_asm.h [IA64] Make gp value point to Region 5 in mca handler 2006-09-26 14:13:03 -07:00
mca.h [IA64] Sanitize assembler code for ia64_sal_os_state 2006-06-21 14:44:26 -07:00
meminit.h [IA64] kexec: Use EFI_LOADER_DATA for ELF core header 2007-03-06 14:50:33 -08:00
mman.h [PATCH] IA64,sparc: local DoS with corrupted ELFs 2006-09-08 08:40:46 -07:00
mmu_context.h
mmu.h
mmzone.h
module.h [PATCH] Move compiler check for modules to ia64 only 2006-09-26 10:52:37 +02:00
msgbuf.h
mutex.h [IA64] fix bug in ia64 __mutex_fastpath_trylock 2006-04-07 22:39:49 -07:00
namei.h
nodedata.h [PATCH] pgdat allocation and update for ia64 of memory hotplug: update pgdat address array 2006-06-27 17:32:37 -07:00
numa.h [PATCH] fix "cpu to node relationship fixup: map cpu to node" 2006-09-27 08:26:08 -07:00
page.h [IA64] Fix DISCONTIGMEM without VIRTUAL_MEM_MAP 2006-12-07 11:24:03 -08:00
pal.h Fix typos concerning hierarchy 2007-02-17 19:23:03 +01:00
param.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
parport.h
patch.h
pci.h ia64: add pci_get_legacy_ide_irq() 2007-01-27 13:46:54 +01:00
percpu.h [PATCH] lockdep: add per_cpu_offset() 2006-07-03 15:27:00 -07:00
perfmon_default_smpl.h
perfmon.h
pgalloc.h [IA64] virt_to_page() can be called with NULL arg 2007-02-05 16:47:02 -08:00
pgtable.h [PATCH] Standardize pxx_page macros 2006-09-26 08:48:51 -07:00
poll.h [PATCH] POLLRDHUP/EPOLLRDHUP handling for half-closed devices notifications 2006-03-25 08:22:56 -08:00
posix_types.h [PATCH] FD_ZERO build fix 2007-01-11 18:18:22 -08:00
processor.h [IA64] Move perfmon tables from thread_struct to pfm_context 2006-09-26 12:03:13 -07:00
ptrace_offsets.h
ptrace.h [PATCH] Add regs_return_value() helper 2006-10-02 07:57:16 -07:00
resource.h [IA64] Remove stack hard limit on ia64 2007-03-06 14:48:19 -08:00
rse.h
rwsem.h [PATCH] lockdep: remove RWSEM_DEBUG remnants 2006-07-03 15:27:01 -07:00
sal.h [IA64] move SAL_CACHE_FLUSH check later in boot 2006-10-31 14:32:10 -08:00
scatterlist.h [IA64] Move sg_dma_{len,address} from pci.h to scatterlist.h 2006-12-13 13:15:10 -08:00
sections.h
segment.h
semaphore.h [IA64] Fix bug in ia64 specific down() function 2006-01-17 14:04:00 -08:00
sembuf.h
serial.h
setup.h [PATCH] ia64: 2048-byte command line 2007-02-12 09:48:39 -08:00
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h [PATCH] irq-flags: IA64: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
smp.h Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-09-27 10:53:30 -07:00
socket.h [AF_UNIX]: Datagram getpeersec 2006-06-29 16:58:06 -07:00
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks 2006-10-01 00:39:21 -07:00
stat.h
statfs.h
string.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
suspend.h
system.h [IA64] sparse cleanups 2006-08-02 16:03:44 -07:00
termbits.h [PATCH] tty: preparatory structures for termios revamp 2006-12-08 08:28:56 -08:00
termios.h [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
thread_info.h [IA64] enable singlestep on system call 2007-02-05 13:49:29 -08:00
timex.h [IA64] ia64: simplify and fix udelay() 2006-02-15 13:37:04 -08:00
tlb.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
tlbflush.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
topology.h [PATCH] sched: remove SMT nice 2007-03-05 07:57:51 -08:00
types.h
uaccess.h [IA64] don't double >> PAGE_SHIFT pointer for /dev/kmem access 2006-10-26 14:57:06 -07:00
ucontext.h
unaligned.h
uncached.h
unistd.h [IA64] Hook up getcpu system call for IA64 2007-02-05 16:56:36 -08:00
unwind.h
user.h
ustack.h [PATCH] Fix 'make headers_check' on ia64 2006-09-16 12:54:32 -07:00
vga.h [PATCH] vgacon: make VGA_MAP_MEM take size, remove extra use 2006-06-22 15:05:58 -07:00
xor.h