blob: 65b8256d81cbfad3b6b1fd589329dc7dcaf6769f [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 */
Magnus Dammb34bce42010-05-18 14:42:40 +000016 mova extra_data_pos, r0
17 mov.l extra_data_size, r1
18 add r1, r0
Magnus Damm6a5a0b92009-12-04 06:42:35 +000019 mov.l empty_zero_page_dst, r1
20 mov #(PAGE_SHIFT - 4), r4
21 mov #1, r3
22 shld r4, r3 /* r3 = PAGE_SIZE / 16 */
23
241:
25 mov.l @r0, r4
26 mov.l @(4, r0), r5
27 mov.l @(8, r0), r6
28 mov.l @(12, r0), r7
29 add #16,r0
30 mov.l r4, @r1
31 mov.l r5, @(4, r1)
32 mov.l r6, @(8, r1)
33 mov.l r7, @(12, r1)
34 dt r3
35 add #16,r1
36 bf 1b
37
38 /* jump to the zImage entry point located after the zero page data */
39 mov #PAGE_SHIFT, r4
40 mov #1, r1
41 shld r4, r1
Magnus Dammb34bce42010-05-18 14:42:40 +000042 mova extra_data_pos, r0
43 add r1, r0
44 mov.l extra_data_size, r1
Magnus Damm6a5a0b92009-12-04 06:42:35 +000045 add r1, r0
46 jmp @r0
47 nop
48
49 .align 2
50empty_zero_page_dst:
51 .long _text
Magnus Dammb34bce42010-05-18 14:42:40 +000052extra_data_pos:
53extra_data_size:
54 .long zero_page_pos - extra_data_pos