]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/kernel/relocate_kernel.S
Merge branch 'pxa-plat' into devel
[linux-2.6-omap-h63xx.git] / arch / arm / kernel / relocate_kernel.S
index 7baadae7cb278f7c78fb2dd8ba079b0406f94bc5..062c111c572feb9bc223ea08399e931f67613c10 100644 (file)
@@ -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