OpenCores
URL https://opencores.org/ocsvn/mips_enhanced/mips_enhanced/trunk

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [software/] [leon3/] [prom.S] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
 
2
/* Template boot-code for LEON3 test benches */
3
 
4
#include "prom.h"
5
 
6
#ifndef STACKSIZE
7
#define STACKSIZE 0x00020000
8
#endif
9
 
10
 
11
        .seg    "text"
12
        .proc   0
13
        .align  4
14
        .global start
15
start:
16
 
17
        flush
18
        set 0x10e0, %g1         ! init IU
19
        mov %g1, %psr
20
        mov %g0, %wim
21
        mov %g0, %tbr
22
        mov %g0, %y
23
        mov %g0, %asr16
24
        nop
25
        set  0x81000f, %g1
26
        sta %g1, [%g0] 2
27
        mov %g0, %g2
28
        nop
29
        nop
30
        nop
31
        nop
32
        nop
33
        or %g2, %g2, %g0
34
        nop
35
        nop
36
        nop
37
        nop
38
        nop
39
#ifdef DSUADDR
40
        set     DSUADDR, %g2
41
        st      %g0, [%g2]
42
        st      %g0, [%g2+0x08]
43
        st      %g0, [%g2+0x20]
44
        st      %g0, [%g2+0x24]
45
        st      %g0, [%g2+0x40]
46
        st      %g0, [%g2+0x44]
47
        st      %g0, [%g2+0x50]
48
        st      %g0, [%g2+0x54]
49
        st      %g0, [%g2+0x58]
50
        st      %g0, [%g2+0x5C]
51
        st      %g0, [%g2+0x54]
52
#endif
53
 
54
2:
55
        mov %asr17, %g3
56
        and %g3, 0x1f, %g3
57
        mov %g0, %g4
58
        mov %g0, %g5
59
        mov %g0, %g6
60
        mov %g0, %g7
61
1:
62
        mov %g0, %l0
63
        mov %g0, %l1
64
        mov %g0, %l2
65
        mov %g0, %l3
66
        mov %g0, %l4
67
        mov %g0, %l5
68
        mov %g0, %l6
69
        mov %g0, %l7
70
        mov %g0, %o0
71
        mov %g0, %o1
72
        mov %g0, %o2
73
        mov %g0, %o3
74
        mov %g0, %o4
75
        mov %g0, %o5
76
        mov %g0, %o6
77
        mov %g0, %o7
78
        subcc %g3, 1, %g3
79
        bge 1b
80
        save
81
 
82
        mov     2, %g1
83
        mov     %g1, %wim
84
        set 0x10e0, %g1         ! enable traps
85
        mov %g1, %psr
86
        nop; nop; nop;
87
 
88
        mov %psr, %g1
89
        srl %g1, 12, %g1
90
        andcc %g1, 1, %g0
91
        be 1f
92
        nop
93
 
94
        set _fsrxx, %g3
95
        ld [%g3], %fsr
96
        ldd [%g3], %f0
97
        ldd [%g3], %f2
98
        ldd [%g3], %f4
99
        ldd [%g3], %f6
100
        ldd [%g3], %f8
101
        ldd [%g3], %f10
102
        ldd [%g3], %f12
103
        ldd [%g3], %f14
104
        ldd [%g3], %f16
105
        ldd [%g3], %f18
106
        ldd [%g3], %f20
107
        ldd [%g3], %f22
108
        ldd [%g3], %f24
109
        ldd [%g3], %f26
110
        ldd [%g3], %f28
111
        ldd [%g3], %f30
112
        nop
113
        nop
114
        nop
115
        nop
116
        nop
117
        faddd %f0, %f2, %f4
118
        nop
119
        nop
120
        nop
121
        nop
122
        ba  1f
123
        nop
124
 
125
 
126
.align  8
127
_fsrxx:
128
        .word 0
129
        .word 0
130
 
131
1:
132
        mov %asr17, %g3
133
        srl %g3, 28, %g3
134
        andcc %g3, 0x0f, %g3
135
        bne 1f
136
 
137
        set L2MCTRLIO, %g1
138
        set MCFG1, %g2
139
        st  %g2, [%g1]
140
        set MCFG2, %g2
141
        st  %g2, [%g1+4]
142
        set MCFG3, %g2
143
        st  %g2, [%g1+8]
144
!       set IRQCTRL, %g1
145
!       set 0x0ffff, %g2
146
!       st  %g2, [%g1+0x10]
147
 
148
        set 0xFFFFF860, %g1
149
        ld  [%g1], %g2
150
        srl %g2, 12, %g2
151
        set 0x01009, %g1
152
        subcc %g1, %g2, %g0
153
        bne 1f
154
 
155
        set ASDCFG, %g1
156
        set DSDCFG, %g2
157
        st  %g2, [%g1]
158
 
159
        ! %g3 = cpu index
160
1:      set STACKSIZE, %g2
161
        mov %g0, %g1
162
2:      subcc %g3, 0, %g0
163
        be 3f
164
        nop
165
        add %g1, %g2, %g1
166
        ba 2b
167
        sub %g3, 1, %g3
168
 
169
 
170
3:      set RAMSTART+ RAMSIZE-32, %fp
171
        sub %fp, %g1, %fp
172
        sub %fp, 96, %sp
173
 
174
        set RAMSTART, %g1
175
 
176
        jmp %g1
177
        nop
178
 
179
.align  32

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.