blob: 2b448a297011f43ed1a26924fe22e6ef0eecb9b9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <linux/config.h>
2
3 .global _start
4 .global _stext
5
6 .global _rambase
7 .global _ramvec
8 .global _ramstart
9 .global _ramend
10
11#ifdef CONFIG_INIT_LCD
12 .global splash_bits
13#endif
14
15 .data
16
17/*
18 * Set up the usable of RAM stuff. Size of RAM is determined then
19 * an initial stack set up at the end.
20 */
21.align 4
22_ramvec:
23.long 0
24_rambase:
25.long 0
26_ramstart:
27.long 0
28_ramend:
29.long 0
30
31#ifdef CONFIG_INIT_LCD
32splash_bits:
33#include "bootlogo.rh"
34#endif
35
36 .text
37_start:
38_stext: movew #0x2700,%sr
39#ifdef CONFIG_INIT_LCD
40 movel #splash_bits, 0xfffffA00 /* LSSA */
41 moveb #0x28, 0xfffffA05 /* LVPW */
42 movew #0x280, 0xFFFFFa08 /* LXMAX */
43 movew #0x1df, 0xFFFFFa0a /* LYMAX */
44 moveb #0, 0xfffffa29 /* LBAR */
45 moveb #0, 0xfffffa25 /* LPXCD */
46 moveb #0x08, 0xFFFFFa20 /* LPICF */
47 moveb #0x01, 0xFFFFFA21 /* -ve pol */
48 moveb #0x81, 0xfffffA27 /* LCKCON */
49 movew #0xff00, 0xfffff412 /* LCD pins */
50#endif
51 moveal #__ramend-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp
52 movew #32767, %d0 /* PLL settle wait loop */
531: subq #1, %d0
54 bne 1b
55
56 /* Copy data segment from ROM to RAM */
57 moveal #_etext, %a0
58 moveal #_sdata, %a1
59 moveal #_edata, %a2
60
61 /* Copy %a0 to %a1 until %a1 == %a2 */
621: movel %a0@+, %a1@+
63 cmpal %a1, %a2
64 bhi 1b
65
66 moveal #_sbss, %a0
67 moveal #_ebss, %a1
68 /* Copy 0 to %a0 until %a0 == %a1 */
69
701:
71 clrl %a0@+
72 cmpal %a0, %a1
73 bhi 1b
74
75 movel #_sdata, %d0
76 movel %d0, _rambase
77 movel #_ebss, %d0
78 movel %d0, _ramstart
79 movel #__ramend-CONFIG_MEMORY_RESERVE*0x100000, %d0
80 movel %d0, _ramend
81 movel #__ramvec, %d0
82 movel %d0, _ramvec
83
84/*
85 * load the current task pointer and stack
86 */
87 lea init_thread_union, %a0
88 lea 0x2000(%a0), %sp
89
901: jsr start_kernel
91 bra 1b
92_exit:
93
94 jmp _exit
95
96
97putc:
98 moveb %d7,0xfffff907
991:
100 movew 0xfffff906, %d7
101 andw #0x2000, %d7
102 beq 1b
103 rts
104
105 .data
106env:
107 .long 0
108 .text
109