Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[sfrench/cifs-2.6.git] / arch / sh / boot / romimage / head.S
1 /*
2  *  linux/arch/sh/boot/romimage/head.S
3  *
4  * Board specific setup code, executed before zImage loader
5  */
6
7 .text
8         #include <asm/page.h>
9
10         .global romstart
11 romstart:
12         /* include board specific setup code */
13 #include <mach/romimage.h>
14
15         /* copy the empty_zero_page contents to where vmlinux expects it */
16         mova    empty_zero_page_src, r0
17         mov.l   empty_zero_page_dst, r1
18         mov     #(PAGE_SHIFT - 4), r4
19         mov     #1, r3
20         shld    r4, r3 /* r3 = PAGE_SIZE / 16 */
21
22 1:
23         mov.l   @r0, r4
24         mov.l   @(4, r0), r5
25         mov.l   @(8, r0), r6
26         mov.l   @(12, r0), r7
27         add     #16,r0
28         mov.l   r4, @r1
29         mov.l   r5, @(4, r1)
30         mov.l   r6, @(8, r1)
31         mov.l   r7, @(12, r1)
32         dt      r3
33         add     #16,r1
34         bf      1b
35
36         /* jump to the zImage entry point located after the zero page data */
37         mov     #PAGE_SHIFT, r4
38         mov     #1, r1
39         shld    r4, r1
40         mova    empty_zero_page_src, r0
41         add     r1, r0
42         jmp     @r0
43          nop
44
45         .align 2
46 empty_zero_page_dst:
47         .long   _text
48 empty_zero_page_src: