relocate_kernel.S (65a6ec0d72a07f16719e9b7a96e1c4bae044b591) relocate_kernel.S (4cd9d6f774c7e0578bbc4409d4490d8f2097d40a)
1/*
2 * relocate_kernel.S - put the kernel image in place to boot
3 */
4
5#include <asm/kexec.h>
6
7 .globl relocate_new_kernel
8relocate_new_kernel:
9
1/*
2 * relocate_kernel.S - put the kernel image in place to boot
3 */
4
5#include <asm/kexec.h>
6
7 .globl relocate_new_kernel
8relocate_new_kernel:
9
10 /* Move boot params back to where the kernel expects them */
11
12 ldr r0,kexec_boot_params_address
13 teq r0,#0
14 beq 8f
15
16 ldr r1,kexec_boot_params_copy
17 mov r6,#KEXEC_BOOT_PARAMS_SIZE/4
187:
19 ldr r5,[r1],#4
20 str r5,[r0],#4
21 subs r6,r6,#1
22 bne 7b
23
248:
25 /* Boot params moved, now go on with the kernel */
26
27 ldr r0,kexec_indirection_page
28 ldr r1,kexec_start_address
29
30
310: /* top, read another word for the indirection page */
32 ldr r3, [r0],#4
33
34 /* Is it a destination page. Put destination address to r4 */

--- 27 unchanged lines hidden (view full) ---

62 bne 9b
63 b 0b
64
652:
66 /* Jump to relocated kernel */
67 mov lr,r1
68 mov r0,#0
69 ldr r1,kexec_mach_type
10 ldr r0,kexec_indirection_page
11 ldr r1,kexec_start_address
12
13
140: /* top, read another word for the indirection page */
15 ldr r3, [r0],#4
16
17 /* Is it a destination page. Put destination address to r4 */

--- 27 unchanged lines hidden (view full) ---

45 bne 9b
46 b 0b
47
482:
49 /* Jump to relocated kernel */
50 mov lr,r1
51 mov r0,#0
52 ldr r1,kexec_mach_type
70 ldr r2,kexec_boot_params_address
53 ldr r2,kexec_boot_atags
71 mov pc,lr
72
73 .globl kexec_start_address
74kexec_start_address:
75 .long 0x0
76
77 .globl kexec_indirection_page
78kexec_indirection_page:
79 .long 0x0
80
81 .globl kexec_mach_type
82kexec_mach_type:
83 .long 0x0
84
54 mov pc,lr
55
56 .globl kexec_start_address
57kexec_start_address:
58 .long 0x0
59
60 .globl kexec_indirection_page
61kexec_indirection_page:
62 .long 0x0
63
64 .globl kexec_mach_type
65kexec_mach_type:
66 .long 0x0
67
85 /* phy addr where new kernel will expect to find boot params */
86 .globl kexec_boot_params_address
87kexec_boot_params_address:
68 /* phy addr of the atags for the new kernel */
69 .globl kexec_boot_atags
70kexec_boot_atags:
88 .long 0x0
89
71 .long 0x0
72
90 /* phy addr where old kernel put a copy of orig boot params */
91 .globl kexec_boot_params_copy
92kexec_boot_params_copy:
93 .long 0x0
94
95relocate_new_kernel_end:
96
97 .globl relocate_new_kernel_size
98relocate_new_kernel_size:
99 .long relocate_new_kernel_end - relocate_new_kernel
100
101
73relocate_new_kernel_end:
74
75 .globl relocate_new_kernel_size
76relocate_new_kernel_size:
77 .long relocate_new_kernel_end - relocate_new_kernel
78
79