• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/m68knommu/platform/68328/
1
2	.global __main
3	.global __rom_start
4
5        .global _rambase
6        .global _ramstart
7
8	.global splash_bits
9	.global _start
10	.global _stext
11	.global _edata
12
13#define DEBUG
14#define ROM_OFFSET 0x10C00000
15#define STACK_GAURD 0x10
16
17	.text
18
19_start:
20_stext:
21	movew	#0x2700, %sr            /* Exceptions off! */
22
23
24	movew	#16384, %d0  /* PLL settle wait loop */
25L0:
26	subw	#1, %d0
27	bne	L0
28#ifdef DEBUG
29	moveq	#70, %d7		/* 'F' */
30	moveb	%d7,0xfffff907          /* No absolute addresses */
31pclp1:
32	movew	0xfffff906, %d7
33	andw	#0x2000, %d7
34	beq	pclp1
35#endif /* DEBUG */
36
37#ifdef CONFIG_RELOCATE
38	/* Copy me to RAM */
39	moveal	#__rom_start, %a0
40	moveal	#_stext, %a1
41	moveal	#_edata, %a2
42
43	/* Copy %a0 to %a1 until %a1 == %a2 */
44LD1:
45	movel	%a0@+, %d0
46	movel	%d0, %a1@+
47	cmpal	%a1, %a2
48	bhi	LD1
49
50#ifdef DEBUG
51	moveq	#74, %d7		/* 'J' */
52	moveb	%d7,0xfffff907          /* No absolute addresses */
53pclp2:
54	movew	0xfffff906, %d7
55	andw	#0x2000, %d7
56	beq	pclp2
57#endif /* DEBUG */
58	/* jump into the RAM copy */
59	jmp     ram_jump
60ram_jump:
61
62#endif /* CONFIG_RELOCATE */
63
64#ifdef DEBUG
65	moveq	#82, %d7		/* 'R' */
66	moveb	%d7,0xfffff907          /* No absolute addresses */
67pclp3:
68	movew	0xfffff906, %d7
69	andw	#0x2000, %d7
70	beq	pclp3
71#endif /* DEBUG */
72	moveal	#0x007ffff0, %ssp
73	moveal	#_sbss, %a0
74	moveal	#_ebss, %a1
75
76	/* Copy 0 to %a0 until %a0 >= %a1 */
77L1:
78	movel	#0, %a0@+
79	cmpal	%a0, %a1
80	bhi	L1
81
82#ifdef DEBUG
83	moveq	#67, %d7                /* 'C' */
84	jsr	putc
85#endif /* DEBUG */
86
87	pea	0
88	pea	env
89	pea	%sp@(4)
90	pea	0
91
92#ifdef DEBUG
93	moveq	#70, %d7		/* 'F' */
94	jsr	putc
95#endif /* DEBUG */
96
97lp:
98	jsr	start_kernel
99        jmp lp
100_exit:
101
102	jmp	_exit
103
104__main:
105	/* nothing */
106	rts
107
108#ifdef DEBUG
109putc:
110	moveb	%d7,0xfffff907
111pclp:
112	movew	0xfffff906, %d7
113	andw	#0x2000, %d7
114	beq	pclp
115	rts
116#endif /* DEBUG */
117
118	.data
119
120/*
121 *      Set up the usable of RAM stuff. Size of RAM is determined then
122 *      an initial stack set up at the end.
123 */
124.align 4
125_ramvec:
126.long   0
127_rambase:
128.long   0
129_ramstart:
130.long   0
131_ramend:
132.long   0
133
134env:
135	.long	0
136