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-asic/] [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
        mov %g0, %asr16
23
        nop
24
        set  0x81000f, %g1
25
        sta %g1, [%g0] 2
26
        mov %g0, %g2
27
2:
28
        mov %asr17, %g3
29
        and %g3, 0x1f, %g3
30
        mov %g0, %g4
31
        mov %g0, %g5
32
        mov %g0, %g6
33
        mov %g0, %g7
34
1:
35
        mov %g0, %l0
36
        mov %g0, %l1
37
        mov %g0, %l2
38
        mov %g0, %l3
39
        mov %g0, %l4
40
        mov %g0, %l5
41
        mov %g0, %l6
42
        mov %g0, %l7
43
        mov %g0, %o0
44
        mov %g0, %o1
45
        mov %g0, %o2
46
        mov %g0, %o3
47
        mov %g0, %o4
48
        mov %g0, %o5
49
        mov %g0, %o6
50
        mov %g0, %o7
51
        subcc %g3, 1, %g3
52
        bge 1b
53
        save
54
 
55
        mov     2, %g1
56
        mov     %g1, %wim
57
        set 0x10e0, %g1         ! enable traps
58
        mov %g1, %psr
59
        nop; nop; nop;
60
 
61
        mov %psr, %g1
62
        srl %g1, 12, %g1
63
        andcc %g1, 1, %g0
64
        be 1f
65
        nop
66
 
67
        set _fsrxx, %g3
68
        ld [%g3], %fsr
69
        ldd [%g3], %f0
70
        ldd [%g3], %f2
71
        ldd [%g3], %f4
72
        ldd [%g3], %f6
73
        ldd [%g3], %f8
74
        ldd [%g3], %f10
75
        ldd [%g3], %f12
76
        ldd [%g3], %f14
77
        ldd [%g3], %f16
78
        ldd [%g3], %f18
79
        ldd [%g3], %f20
80
        ldd [%g3], %f22
81
        ldd [%g3], %f24
82
        ldd [%g3], %f26
83
        ldd [%g3], %f28
84
        ldd [%g3], %f30
85
        ba  1f
86
        nop
87
 
88
 
89
.align  8
90
_fsrxx:
91
        .word 0
92
        .word 0
93
 
94
1:
95
        mov %asr17, %g3
96
        srl %g3, 28, %g3
97
        andcc %g3, 0x0f, %g3
98
        bne 1f
99
 
100
        set L2MCTRLIO, %g1
101
        set MCFG1, %g2
102
        st  %g2, [%g1]
103
        set MCFG2, %g2
104
        st  %g2, [%g1+4]
105
        set MCFG3, %g2
106
        st  %g2, [%g1+8]
107
!       set IRQCTRL, %g1
108
!       set 0x0ffff, %g2
109
!       st  %g2, [%g1+0x10]
110
 
111
        set 0xFFFFF860, %g1
112
        ld  [%g1], %g2
113
        srl %g2, 12, %g2
114
        set 0x01009, %g1
115
        subcc %g1, %g2, %g0
116
        bne 1f
117
 
118
        set ASDCFG, %g1
119
        set DSDCFG, %g2
120
        st  %g2, [%g1]
121
 
122
        ! %g3 = cpu index
123
1:
124
        sll %g3, 24, %g4
125
        set 0x90000000, %g5
126
        st %g0, [%g5+%g4]
127
 
128
        set STACKSIZE, %g2
129
        mov %g0, %g1
130
2:      subcc %g3, 0, %g0
131
        be 3f
132
        nop
133
        add %g1, %g2, %g1
134
        ba 2b
135
        sub %g3, 1, %g3
136
 
137
 
138
3:      set RAMSTART+ RAMSIZE-64, %fp
139
        sub %fp, %g1, %fp
140
        sub %fp, 96, %sp
141
 
142
        set RAMSTART, %g1
143
 
144
        jmp %g1
145
        nop
146
 
147
.align  32

powered by: WebSVN 2.1.0

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