blob: 93e779a405eca3bf17fbc50e6e6cea41f8963d48 [file] [log] [blame]
Magnus Damm3c928322009-07-29 15:04:05 +00001/*
2 * linux/arch/sh/boot/romimage/head.S
3 *
4 * Board specific setup code, executed before zImage loader
5 */
6
7.text
Magnus Damm6a5a0b92009-12-04 06:42:35 +00008 #include <asm/page.h>
9
Magnus Damm3c928322009-07-29 15:04:05 +000010 .global romstart
11romstart:
Magnus Damm6a5a0b92009-12-04 06:42:35 +000012 /* include board specific setup code */
Magnus Damm2d2bcd32009-08-07 03:58:38 +090013#include <mach/romimage.h>
Magnus Damm6a5a0b92009-12-04 06:42:35 +000014
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
221:
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
46empty_zero_page_dst:
47 .long _text
48empty_zero_page_src: