aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/kernel/relocate_kernel.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 16:08:50 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 16:08:50 -0700
commit65a6ec0d72a07f16719e9b7a96e1c4bae044b591 (patch)
tree344e03a5039a44982c1b78d6113633b21b434820 /arch/arm/kernel/relocate_kernel.S
parent541010e4b8921cd781ff02ae68028501457045b6 (diff)
parent0181b61a988424b5cc44fe09e6968142359c815e (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (95 commits) [ARM] 4578/1: CM-x270: PCMCIA support [ARM] 4577/1: ITE 8152 PCI bridge support [ARM] 4576/1: CM-X270 machine support [ARM] pxa: Avoid pxa_gpio_mode() in gpio_direction_{in,out}put() [ARM] pxa: move pxa_set_mode() from pxa2xx_mainstone.c to mainstone.c [ARM] pxa: move pxa_set_mode() from pxa2xx_lubbock.c to lubbock.c [ARM] pxa: Make cpu_is_pxaXXX dependent on configuration symbols [ARM] pxa: PXA3xx base support [NET] smc91x: fix PXA DMA support code [SERIAL] Fix console initialisation ordering [ARM] pxa: tidy up arch/arm/mach-pxa/Makefile [ARM] Update arch/arm/Kconfig for drivers/Kconfig changes [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils [ARM] 4599/1: Preserve ATAG list for use with kexec (2.6.23) [ARM] Rename consistent_sync() as dma_cache_maint() [ARM] 4572/1: ep93xx: add cirrus logic edb9307 support [ARM] 4596/1: S3C2412: Correct IRQs for SDI+CF and add decoding support [ARM] 4595/1: ns9xxx: define registers as void __iomem * instead of volatile u32 [ARM] 4594/1: ns9xxx: use the new gpio functions [ARM] 4593/1: ns9xxx: implement generic clockevents ...
Diffstat (limited to 'arch/arm/kernel/relocate_kernel.S')
-rw-r--r--arch/arm/kernel/relocate_kernel.S29
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S
index 7baadae7cb2..062c111c572 100644
--- a/arch/arm/kernel/relocate_kernel.S
+++ b/arch/arm/kernel/relocate_kernel.S
@@ -7,6 +7,23 @@
.globl relocate_new_kernel
relocate_new_kernel:
+ /* Move boot params back to where the kernel expects them */
+
+ ldr r0,kexec_boot_params_address
+ teq r0,#0
+ beq 8f
+
+ ldr r1,kexec_boot_params_copy
+ mov r6,#KEXEC_BOOT_PARAMS_SIZE/4
+7:
+ ldr r5,[r1],#4
+ str r5,[r0],#4
+ subs r6,r6,#1
+ bne 7b
+
+8:
+ /* Boot params moved, now go on with the kernel */
+
ldr r0,kexec_indirection_page
ldr r1,kexec_start_address
@@ -50,7 +67,7 @@ relocate_new_kernel:
mov lr,r1
mov r0,#0
ldr r1,kexec_mach_type
- mov r2,#0
+ ldr r2,kexec_boot_params_address
mov pc,lr
.globl kexec_start_address
@@ -65,6 +82,16 @@ kexec_indirection_page:
kexec_mach_type:
.long 0x0
+ /* phy addr where new kernel will expect to find boot params */
+ .globl kexec_boot_params_address
+kexec_boot_params_address:
+ .long 0x0
+
+ /* phy addr where old kernel put a copy of orig boot params */
+ .globl kexec_boot_params_copy
+kexec_boot_params_copy:
+ .long 0x0
+
relocate_new_kernel_end:
.globl relocate_new_kernel_size