1
2
3
4
5#include <asm/kexec.h>
6
7 .globl relocate_new_kernel
8relocate_new_kernel:
9
10 ldr r0,kexec_indirection_page
11 ldr r1,kexec_start_address
12
13
14
15
16
17 cmp r0,
18 beq 2f
19
200:
21 ldr r3, [r0],
22
23
24 tst r3,
25 beq 1f
26 bic r4,r3,
27 b 0b
281:
29
30 tst r3,
31 beq 1f
32 bic r0,r3,
33 b 0b
341:
35
36
37 tst r3,
38 beq 1f
39 b 2f
40
411:
42
43 tst r3,
44 beq 0b
45 bic r3,r3,
46 mov r6,
479:
48 ldr r5,[r3],
49 str r5,[r4],
50 subs r6,r6,
51 bne 9b
52 b 0b
53
542:
55
56 mov lr,r1
57 mov r0,
58 ldr r1,kexec_mach_type
59 ldr r2,kexec_boot_atags
60 ARM( mov pc, lr )
61 THUMB( bx lr )
62
63 .align
64
65 .globl kexec_start_address
66kexec_start_address:
67 .long 0x0
68
69 .globl kexec_indirection_page
70kexec_indirection_page:
71 .long 0x0
72
73 .globl kexec_mach_type
74kexec_mach_type:
75 .long 0x0
76
77
78 .globl kexec_boot_atags
79kexec_boot_atags:
80 .long 0x0
81
82relocate_new_kernel_end:
83
84 .globl relocate_new_kernel_size
85relocate_new_kernel_size:
86 .long relocate_new_kernel_end - relocate_new_kernel
87
88
89