aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300/lib/romfs.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/h8300/lib/romfs.S
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/h8300/lib/romfs.S')
-rw-r--r--arch/h8300/lib/romfs.S58
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/h8300/lib/romfs.S b/arch/h8300/lib/romfs.S
new file mode 100644
index 000000000000..b72f93a47e31
--- /dev/null
+++ b/arch/h8300/lib/romfs.S
@@ -0,0 +1,58 @@
1/* romfs move to __ebss */
2
3#include <asm/linkage.h>
4#include <linux/config.h>
5
6#if defined(__H8300H__)
7 .h8300h
8#endif
9#if defined(__H8300S__)
10 .h8300s
11#endif
12
13#define BLKOFFSET 512
14
15 .text
16.globl __move_romfs
17_romfs_sig_len = 8
18
19__move_romfs:
20 mov.l #__sbss,er0
21 mov.l #_romfs_sig,er1
22 mov.b #_romfs_sig_len,r3l
231: /* check romfs image */
24 mov.b @er0+,r2l
25 mov.b @er1+,r2h
26 cmp.b r2l,r2h
27 bne 2f
28 dec.b r3l
29 bne 1b
30
31 /* find romfs image */
32 mov.l @__sbss+8,er0 /* romfs length(be) */
33 mov.l #__sbss,er1
34 add.l er0,er1 /* romfs image end */
35 mov.l #__ebss,er2
36 add.l er0,er2 /* distination address */
37#if defined(CONFIG_INTELFLASH)
38 add.l #BLKOFFSET,er2
39#endif
40 adds #2,er0
41 adds #1,er0
42 shlr er0
43 shlr er0 /* transfer length */
441:
45 mov.l @er1,er3 /* copy image */
46 mov.l er3,@er2
47 subs #4,er1
48 subs #4,er2
49 dec.l #1,er0
50 bpl 1b
512:
52 rts
53
54 .section .rodata
55_romfs_sig:
56 .ascii "-rom1fs-"
57
58 .end