aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2008-01-01 18:56:46 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-02-04 08:21:03 -0500
commit4cd9d6f774c7e0578bbc4409d4490d8f2097d40a (patch)
treec910cfc0def573a681fe8c75e1e35abd93496151 /arch/arm/kernel/machine_kexec.c
parentae9458d6a0956aa21cb49e1251e35a8d4dacbe6e (diff)
[ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags
Currently, the atags used by kexec are fixed to the ones originally used to boot the kernel. This is less than ideal as changing the commandline, initrd and other options would be a useful feature. This patch exports the atags used for the current kernel to userspace through an "atags" file in procfs. The presence of the file is controlled by its own Kconfig option and cleans up several ifdef blocks into a separate file. The tags for the new kernel are assumed to be at a fixed location before the kernel image itself. The location of the tags used to boot the original kernel is unimportant and no longer saved. Based on a patch from Uli Luckas <u.luckas@road.de> Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Uli Luckas <u.luckas@road.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/machine_kexec.c')
-rw-r--r--arch/arm/kernel/machine_kexec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index 863c66454f2b..db8f54a3451f 100644
--- a/arch/arm/kernel/machine_kexec.c
+++ b/arch/arm/kernel/machine_kexec.c
@@ -21,6 +21,7 @@ extern void setup_mm_for_reboot(char mode);
21extern unsigned long kexec_start_address; 21extern unsigned long kexec_start_address;
22extern unsigned long kexec_indirection_page; 22extern unsigned long kexec_indirection_page;
23extern unsigned long kexec_mach_type; 23extern unsigned long kexec_mach_type;
24extern unsigned long kexec_boot_atags;
24 25
25/* 26/*
26 * Provide a dummy crash_notes definition while crash dump arrives to arm. 27 * Provide a dummy crash_notes definition while crash dump arrives to arm.
@@ -62,6 +63,7 @@ void machine_kexec(struct kimage *image)
62 kexec_start_address = image->start; 63 kexec_start_address = image->start;
63 kexec_indirection_page = page_list; 64 kexec_indirection_page = page_list;
64 kexec_mach_type = machine_arch_type; 65 kexec_mach_type = machine_arch_type;
66 kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;
65 67
66 /* copy our kernel relocation code to the control code page */ 68 /* copy our kernel relocation code to the control code page */
67 memcpy(reboot_code_buffer, 69 memcpy(reboot_code_buffer,