2 * relocate_kernel.S for kexec
3 * Created by <nschichan@corp.free.fr> on Thu Oct 12 17:49:57 2006
5 * This source code is licensed under the GNU General Public License,
6 * Version 2. See the file COPYING for more details.
10 #include <asm/asmmacro.h>
11 #include <asm/regdef.h>
13 #include <asm/mipsregs.h>
14 #include <asm/stackframe.h>
15 #include <asm/addrspace.h>
17 .globl relocate_new_kernel
20 PTR_L s0, kexec_indirection_page
21 PTR_L s1, kexec_start_address
27 /* destination page */
30 and s4, s2, ~0x1 /* store destination addr in s4 */
35 /* indirection page, update s0 */
49 beq s3, zero, process_entry
51 li s6, (1 << PAGE_SHIFT) / SZREG
54 /* copy page word by word */
60 beq s6, zero, process_entry
65 /* jump to kexec_start_address */
68 .globl kexec_start_address
72 .globl kexec_indirection_page
73 kexec_indirection_page:
76 relocate_new_kernel_end:
78 .globl relocate_new_kernel_size
79 relocate_new_kernel_size:
80 .long relocate_new_kernel_end - relocate_new_kernel