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

Subversion Repositories mips_enhanced

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

powered by: WebSVN 2.1.0

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