aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-05-18 10:42:40 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-05-31 00:11:34 -0400
commitb34bce45530ca897aea35915e0e42eb3c8047b52 (patch)
treeb59dfbab04aa5225a6c3e26cc7358ecf7c825ea5
parent1238c684325d9710544af6f0d11bf7cd6efd5925 (diff)
sh: allow romImage data between head.S and the zero page
Extend the romImage code to allow putting data between the head.S file and the empty_zero_page. Needed in the case of more advanced loader code in a separate C file. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/boot/romimage/head.S12
-rw-r--r--arch/sh/boot/romimage/vmlinux.scr1
2 files changed, 10 insertions, 3 deletions
diff --git a/arch/sh/boot/romimage/head.S b/arch/sh/boot/romimage/head.S
index 93e779a405e..65b8256d81c 100644
--- a/arch/sh/boot/romimage/head.S
+++ b/arch/sh/boot/romimage/head.S
@@ -13,7 +13,9 @@ romstart:
13#include <mach/romimage.h> 13#include <mach/romimage.h>
14 14
15 /* copy the empty_zero_page contents to where vmlinux expects it */ 15 /* copy the empty_zero_page contents to where vmlinux expects it */
16 mova empty_zero_page_src, r0 16 mova extra_data_pos, r0
17 mov.l extra_data_size, r1
18 add r1, r0
17 mov.l empty_zero_page_dst, r1 19 mov.l empty_zero_page_dst, r1
18 mov #(PAGE_SHIFT - 4), r4 20 mov #(PAGE_SHIFT - 4), r4
19 mov #1, r3 21 mov #1, r3
@@ -37,7 +39,9 @@ romstart:
37 mov #PAGE_SHIFT, r4 39 mov #PAGE_SHIFT, r4
38 mov #1, r1 40 mov #1, r1
39 shld r4, r1 41 shld r4, r1
40 mova empty_zero_page_src, r0 42 mova extra_data_pos, r0
43 add r1, r0
44 mov.l extra_data_size, r1
41 add r1, r0 45 add r1, r0
42 jmp @r0 46 jmp @r0
43 nop 47 nop
@@ -45,4 +49,6 @@ romstart:
45 .align 2 49 .align 2
46empty_zero_page_dst: 50empty_zero_page_dst:
47 .long _text 51 .long _text
48empty_zero_page_src: 52extra_data_pos:
53extra_data_size:
54 .long zero_page_pos - extra_data_pos
diff --git a/arch/sh/boot/romimage/vmlinux.scr b/arch/sh/boot/romimage/vmlinux.scr
index 287c08f8b4b..ea27298a99a 100644
--- a/arch/sh/boot/romimage/vmlinux.scr
+++ b/arch/sh/boot/romimage/vmlinux.scr
@@ -1,6 +1,7 @@
1SECTIONS 1SECTIONS
2{ 2{
3 .text : { 3 .text : {
4 zero_page_pos = .;
4 *(.data) 5 *(.data)
5 } 6 }
6} 7}