summaryrefslogtreecommitdiffstats
path: root/arch/sh/boot
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-05-18 14:42:40 +0000
committerPaul Mundt <lethal@linux-sh.org>2010-05-31 13:11:34 +0900
commitb34bce45530ca897aea35915e0e42eb3c8047b52 (patch)
treeb59dfbab04aa5225a6c3e26cc7358ecf7c825ea5 /arch/sh/boot
parent1238c684325d9710544af6f0d11bf7cd6efd5925 (diff)
downloadop-kernel-dev-b34bce45530ca897aea35915e0e42eb3c8047b52.zip
op-kernel-dev-b34bce45530ca897aea35915e0e42eb3c8047b52.tar.gz
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>
Diffstat (limited to 'arch/sh/boot')
-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 93e779a..65b8256 100644
--- a/arch/sh/boot/romimage/head.S
+++ b/arch/sh/boot/romimage/head.S
@@ -13,7 +13,9 @@ romstart:
#include <mach/romimage.h>
/* copy the empty_zero_page contents to where vmlinux expects it */
- mova empty_zero_page_src, r0
+ mova extra_data_pos, r0
+ mov.l extra_data_size, r1
+ add r1, r0
mov.l empty_zero_page_dst, r1
mov #(PAGE_SHIFT - 4), r4
mov #1, r3
@@ -37,7 +39,9 @@ romstart:
mov #PAGE_SHIFT, r4
mov #1, r1
shld r4, r1
- mova empty_zero_page_src, r0
+ mova extra_data_pos, r0
+ add r1, r0
+ mov.l extra_data_size, r1
add r1, r0
jmp @r0
nop
@@ -45,4 +49,6 @@ romstart:
.align 2
empty_zero_page_dst:
.long _text
-empty_zero_page_src:
+extra_data_pos:
+extra_data_size:
+ .long zero_page_pos - extra_data_pos
diff --git a/arch/sh/boot/romimage/vmlinux.scr b/arch/sh/boot/romimage/vmlinux.scr
index 287c08f..ea27298 100644
--- a/arch/sh/boot/romimage/vmlinux.scr
+++ b/arch/sh/boot/romimage/vmlinux.scr
@@ -1,6 +1,7 @@
SECTIONS
{
.text : {
+ zero_page_pos = .;
*(.data)
}
}
OpenPOWER on IntegriCloud