* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / arch / arm / boot / compressed / head-nexuspci.S
blob1fd49a95c1b59acb1538fa47b733ce966fd44a4c
1 /*
2  * linux/arch/arm/boot/compressed/head-nexuspci.S
3  *
4  * Copyright (C) 1996, 1997, 1998 Philip Blundell
5  *
6  * NexusPCI is unusual because we don't have a bootloader -- the kernel is
7  * run directly out of ROM at the moment.  Maybe this will change one day and
8  * then this file can go away.
9  *
10  */
12                 .text
14 .globl  _start
15 _start:         b       reset
16                 b       undefined
17                 b       undefined
18                 b       undefined
19                 b       undefined
20                 b       undefined
21                 b       undefined
22                 b       undefined
23                 b       go_uncompress
24         
25 reset:          mov     r2, #0x20000000                 @ LED off
26                 mov     r1, #0x1a
27                 str     r1, [r2]
29                 mov     r2, #0x10000000                 @ SCC init
31                 mov     r1, #42
32                 strb    r1, [r2, #8]
34                 mov     r1, #48
35                 strb    r1, [r2, #8]
37                 mov     r1, #16
38                 strb    r1, [r2, #8]
40                 mov     r1, #0x93
41                 strb    r1, [r2, #0]
42                 mov     r1, #0x17
43                 strb    r1, [r2, #0]
45                 mov     r1, #0xbb
46                 strb    r1, [r2, #0x4]
48                 mov     r1, #0x78
49                 strb    r1, [r2, #0x10]
51                 mov     r1, #160
52                 strb    r1, [r2, #0x8]
54                 mov     r1, #5
55                 strb    r1, [r2, #0x8]
57                 ldr     r2, =_start
58                 ldr     r3, =_edata
59                 mov     r8, r2
60                 mov     r0, #0
62                 ldmia   r0!, {r4, r5, r6, r7}
63                 stmia   r2!, {r4, r5, r6, r7}
64                 cmp     r2, r3
65                 ble     1b
67                 ldr     r3, =_edata
68                 ldr     r1, =_end
69                 mov     r2, #0
71                 strb    r2, [r3]
72                 cmp     r3, r1
73                 beq     2f
74                 add     r3, r3, #1
75                 b       1b
76 2:      
77                 add     pc, r8, #0x20
79 undefined:      ldr     r4, =undef_msg
80 1:              ldrb    r0, [r4], #1
81                 movs    r0, r0
82 2:              beq     2b
83                 bl      _ll_write_char
84                 b       1b
86 undef_msg:      .ascii  "Undefined instruction (or other problem)\000"
87                 .align  4
90  * Uncompress the kernel
91  */
92 go_uncompress:
93                 mov     r0, #0x40000000
94                 ldr     sp, =user_stack
95                 add     sp, sp, #4096
96                 bl      decompress_kernel
98                 mov     r2, #0x40000000
99                 mov     r0, #0
100                 mov     r1, #3
101                 add     pc, r2, #0x20           @ call via EXEC entry