Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: ncu_ssi_mt.s | |
5 | * Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
6 | * 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
7 | * | |
8 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
9 | * | |
10 | * This program is free software; you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation; version 2 of the License. | |
13 | * | |
14 | * This program is distributed in the hope that it will be useful, | |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | * GNU General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with this program; if not, write to the Free Software | |
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 | * | |
23 | * For the avoidance of doubt, and except that if any non-GPL license | |
24 | * choice is available it will apply instead, Sun elects to use only | |
25 | * the General Public License version 2 (GPLv2) at this time for any | |
26 | * software where a choice of GPL license versions is made | |
27 | * available with the language indicating that GPLv2 or any later version | |
28 | * may be used, or where a choice of which version of the GPL is applied is | |
29 | * otherwise unspecified. | |
30 | * | |
31 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
32 | * CA 95054 USA or visit www.sun.com if you need additional information or | |
33 | * have any questions. | |
34 | * | |
35 | * | |
36 | * ========== Copyright Header End ============================================ | |
37 | */ | |
38 | #define MAIN_PAGE_NUCLEUS_ALSO | |
39 | #define MAIN_PAGE_HV_ALSO | |
40 | ||
41 | #include "hboot.s" | |
42 | #include "asi_s.h" | |
43 | ||
44 | .text | |
45 | .global main | |
46 | ||
47 | ||
48 | main: | |
49 | ta T_CHANGE_HPRIV | |
50 | ||
51 | get_th_id: | |
52 | ta T_RD_THID | |
53 | wr %g0,ASI_CMP_CORE,%asi | |
54 | ||
55 | cmp %o1,0x0 | |
56 | be thrd_0 | |
57 | nop | |
58 | cmp %o1,54 | |
59 | be thrd_54 | |
60 | nop | |
61 | ba test_fail | |
62 | nop | |
63 | ||
64 | thrd_0: | |
65 | !Write double words to the SSI interface | |
66 | setx 0x000000ffffff0300,%g7,%g1 | |
67 | setx data_xword,%g7,%g2 | |
68 | set 0x10,%g3 | |
69 | loop0: | |
70 | ldub [%g2],%g4 | |
71 | stb %g4,[%g1] | |
72 | add %g1,8,%g1 | |
73 | add %g2,8,%g2 | |
74 | sub %g3,1,%g3 | |
75 | cmp %g3,%g0 | |
76 | bne loop0 | |
77 | nop | |
78 | ||
79 | setx 0x0040000000000000,%g7,%g1 | |
80 | stxa %g1,[ASI_CMP_CORE_RUNNING_RW]%asi | |
81 | ||
82 | halt: | |
83 | ba halt | |
84 | nop | |
85 | ||
86 | thrd_54: | |
87 | !Read back and confirm | |
88 | setx 0x000000ffffff0300,%g7,%g1 | |
89 | setx data_xword,%g7,%g2 | |
90 | set 0x10,%g3 | |
91 | loop1: | |
92 | ldub [%g1],%g4 | |
93 | ldub [%g2],%g5 | |
94 | cmp %g4,%g5 | |
95 | bne %xcc,test_fail | |
96 | nop | |
97 | add %g1,8,%g1 | |
98 | add %g2,8,%g2 | |
99 | sub %g3,1,%g3 | |
100 | cmp %g3,%g0 | |
101 | bne loop1 | |
102 | nop | |
103 | ||
104 | ba test_pass | |
105 | nop | |
106 | ||
107 | /****************************************************** | |
108 | * Exit code | |
109 | *******************************************************/ | |
110 | ||
111 | test_pass: | |
112 | EXIT_GOOD | |
113 | ||
114 | test_fail: | |
115 | EXIT_BAD | |
116 | ||
117 | .data | |
118 | .align 0x100 | |
119 | data_byte: | |
120 | .byte 0x23 | |
121 | .byte 0x39 | |
122 | .byte 0x48 | |
123 | .byte 0xa6 | |
124 | .byte 0xab | |
125 | .byte 0xc3 | |
126 | .byte 0x8f | |
127 | .byte 0xde | |
128 | .byte 0xb2 | |
129 | .byte 0x20 | |
130 | .byte 0x99 | |
131 | .byte 0x8a | |
132 | .byte 0x33 | |
133 | .byte 0x5b | |
134 | .byte 0xbf | |
135 | .byte 0xa0 | |
136 | .byte 0x10 | |
137 | .byte 0x02 | |
138 | .byte 0xbc | |
139 | .byte 0xad | |
140 | .byte 0xae | |
141 | .byte 0x92 | |
142 | .byte 0x44 | |
143 | .byte 0x3c | |
144 | .byte 0xff | |
145 | .byte 0xf1 | |
146 | .byte 0x9f | |
147 | .byte 0x6d | |
148 | .byte 0xeb | |
149 | .byte 0xda | |
150 | .byte 0xd3 | |
151 | .byte 0xa8 | |
152 | ||
153 | .align 0x100 | |
154 | data_half_word: | |
155 | .hword 0x34ad | |
156 | .hword 0xfbac | |
157 | .hword 0xd82c | |
158 | .hword 0xa8d3 | |
159 | .hword 0xffff | |
160 | .hword 0xf238 | |
161 | .hword 0x934d | |
162 | .hword 0x92ab | |
163 | .hword 0x4a87 | |
164 | .hword 0x000a | |
165 | .hword 0x100f | |
166 | .hword 0x02aa | |
167 | .hword 0xb3cc | |
168 | .hword 0xc992 | |
169 | .hword 0xef03 | |
170 | .hword 0xad22 | |
171 | .hword 0x0330 | |
172 | .hword 0x2203 | |
173 | .hword 0x2ffd | |
174 | .hword 0xeddc | |
175 | .hword 0xbbbb | |
176 | .hword 0xa002 | |
177 | .hword 0x4332 | |
178 | .hword 0x98f2 | |
179 | .hword 0x7761 | |
180 | .hword 0x92cb | |
181 | .hword 0xa00b | |
182 | .hword 0xdd81 | |
183 | .hword 0x977a | |
184 | .hword 0x0001 | |
185 | .hword 0x33b4 | |
186 | .hword 0x7d82 | |
187 | ||
188 | .align 0x100 | |
189 | data_word: | |
190 | .word 0x2876adce | |
191 | .word 0x9cb238af | |
192 | .word 0xa8820fb7 | |
193 | .word 0xaf9277cb | |
194 | .word 0x32989782 | |
195 | .word 0x987bdc43 | |
196 | .word 0xba73c0fe | |
197 | .word 0x2399dace | |
198 | .word 0x000bed00 | |
199 | .word 0x833bade2 | |
200 | .word 0x92235456 | |
201 | .word 0xbdceefda | |
202 | .word 0xcb874bcd | |
203 | .word 0x3248cbae | |
204 | .word 0x933bcf26 | |
205 | .word 0x74663bf7 | |
206 | .word 0x6cb4ed6a | |
207 | .word 0x7c7d7e7b | |
208 | .word 0x88bd255c | |
209 | .word 0x933bb265 | |
210 | .word 0x8ccba634 | |
211 | .word 0xaa433ccc | |
212 | .word 0x911000bb | |
213 | .word 0x4532bbcd | |
214 | .word 0x822b3647 | |
215 | .word 0xba7ce43e | |
216 | .word 0x09990909 | |
217 | .word 0x00000223 | |
218 | .word 0xb00000a0 | |
219 | .word 0xbbbc0073 | |
220 | .word 0x337fe887 | |
221 | .word 0x23bb3fee | |
222 | ||
223 | .align 0x100 | |
224 | data_xword: | |
225 | .xword 0xca038347023832d0 | |
226 | .xword 0x9323bfecad638203 | |
227 | .xword 0xabfec27356804bef | |
228 | .xword 0x768fec687937cfea | |
229 | .xword 0x823bfe253cdea397 | |
230 | .xword 0xe2873fe836cd0984 | |
231 | .xword 0xbf363fecda993bad | |
232 | .xword 0xbaceefdefecadbce | |
233 | .xword 0x987233b3fdce9723 | |
234 | .xword 0x0003290432363bde | |
235 | .xword 0xabd934793bdefacd | |
236 | .xword 0xbfecce982734fed8 | |
237 | .xword 0xafbeeedc897633de | |
238 | .xword 0xaaaa0a0a00078389 | |
239 | .xword 0x9283792332f23ede | |
240 | .xword 0xababafecad5ef537 | |
241 | .xword 0xabfe6353f3cd6354 | |
242 | .xword 0xa87329876badfe09 | |
243 | .xword 0x92733cf353fc0082 | |
244 | .xword 0x982332cfedac3275 | |
245 | .xword 0x2765454819238675 | |
246 | .xword 0x932bf23932af639d | |
247 | .xword 0x292364fed043689b | |
248 | .xword 0x0650607211073674 | |
249 | .xword 0xdfce893853cdeaf3 | |
250 | .xword 0xdd04746852834fe9 | |
251 | .xword 0x9232dfeaabbabdeb | |
252 | .xword 0xababdfefdccceaab | |
253 | .xword 0x7cbbe8e53ccefd57 | |
254 | .xword 0x83b3385232dfec12 | |
255 | .xword 0x7675373232f32d32 | |
256 | .xword 0xf363583f35683f21 | |
257 | .end |