1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #include <asm/asm.h>
16 #include <asm/regdef.h>
17
18 .set noreorder
19 .cprestore
20 LEAF(start)
21 start:
22
23 move s0, a0
24 move s1, a1
25 move s2, a2
26 move s3, a3
27
28
29 PTR_LA a0, _edata
30 PTR_LA a2, _end
31 1: sw zero, 0(a0)
32 bne a2, a0, 1b
33 addiu a0, a0, 4
34
35 PTR_LA a0, (.heap)
36 PTR_LA sp, (.stack + 8192)
37
38 PTR_LA ra, 2f
39 PTR_LA k0, decompress_kernel
40 jr k0
41 nop
42 2:
43 move a0, s0
44 move a1, s1
45 move a2, s2
46 move a3, s3
47 PTR_LI k0, KERNEL_ENTRY
48 jr k0
49 nop
50 3:
51 b 3b
52 nop
53 END(start)
54
55 .comm .heap,BOOT_HEAP_SIZE,4
56 .comm .stack,4096*2,4