Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: tlu_rand04_ind_14.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 TRAP_SECT_HV_ALSO | |
39 | #define DMMU_SKIP_IF_NO_TTE | |
40 | #define IMMU_SKIP_IF_NO_TTE | |
41 | ||
42 | #define MAIN_PAGE_NUCLEUS_ALSO | |
43 | #define MAIN_PAGE_HV_ALSO | |
44 | #define MAIN_PAGE_VA_IS_RA_ALSO | |
45 | ||
46 | !!!!!!!!!!!!!!!!!!!!!!!!! | |
47 | !! Disable trap checking | |
48 | #define NO_TRAPCHECK | |
49 | ||
50 | ! Enable Traps | |
51 | #define ENABLE_T1_Privileged_Opcode_0x11 | |
52 | #define ENABLE_T1_Fp_Disabled_0x20 | |
53 | #define ENABLE_HT0_Watchdog_Reset_0x02 | |
54 | ||
55 | #define FILL_TRAP_RETRY | |
56 | #define SPILL_TRAP_RETRY | |
57 | #define CLEAN_WIN_RETRY | |
58 | ||
59 | #define My_RED_Mode_Other_Reset | |
60 | #define My_RED_Mode_Other_Reset \ | |
61 | ba red_other_ext;\ | |
62 | nop;retry;nop;nop;nop;nop;nop | |
63 | ||
64 | #define H_T1_Clean_Window_0x24 | |
65 | #define SUN_H_T1_Clean_Window_0x24 \ | |
66 | rdpr %cleanwin, %g1;\ | |
67 | add %g1,1,%g1;\ | |
68 | wrpr %g1, %g0, %cleanwin;\ | |
69 | retry; nop; nop; nop; nop | |
70 | ||
71 | #define H_T1_Clean_Window_0x25 | |
72 | #define SUN_H_T1_Clean_Window_0x25 \ | |
73 | rdpr %cleanwin, %g1;\ | |
74 | add %g1,1,%g1;\ | |
75 | wrpr %g1, %g0, %cleanwin;\ | |
76 | retry; nop; nop; nop; nop | |
77 | ||
78 | #define H_T1_Clean_Window_0x26 | |
79 | #define SUN_H_T1_Clean_Window_0x26 \ | |
80 | rdpr %cleanwin, %g1;\ | |
81 | add %g1,1,%g1;\ | |
82 | wrpr %g1, %g0, %cleanwin;\ | |
83 | retry; nop; nop; nop; nop | |
84 | ||
85 | #define H_T1_Clean_Window_0x27 | |
86 | #define SUN_H_T1_Clean_Window_0x27 \ | |
87 | rdpr %cleanwin, %g1;\ | |
88 | add %g1,1,%g1;\ | |
89 | wrpr %g1, %g0, %cleanwin;\ | |
90 | retry; nop; nop; nop; nop | |
91 | ||
92 | #define H_HT0_Tag_Overflow | |
93 | #define My_HT0_Tag_Overflow \ | |
94 | done;nop; | |
95 | ||
96 | #define H_T0_Tag_Overflow | |
97 | #define My_T0_Tag_Overflow \ | |
98 | done;nop; | |
99 | ||
100 | #define H_T1_Tag_Overflow_0x23 | |
101 | #define SUN_H_T1_Tag_Overflow_0x23 \ | |
102 | done;nop; | |
103 | ||
104 | #define H_T0_Window_Fill_0_Other_Trap | |
105 | #define SUN_H_T0_Window_Fill_0_Other_Trap restored; retry; nop;nop;nop;nop;nop;nop; | |
106 | ||
107 | #define H_T0_Window_Fill_1_Other_Trap | |
108 | #define SUN_H_T0_Window_Fill_1_Other_Trap restored; retry; nop;nop;nop;nop;nop;nop; | |
109 | ||
110 | #define H_T0_Window_Fill_2_Other_Trap | |
111 | #define SUN_H_T0_Window_Fill_2_Other_Trap restored; retry; nop;nop;nop;nop;nop;nop; | |
112 | ||
113 | #define H_T0_Window_Fill_3_Other_Trap | |
114 | #define SUN_H_T0_Window_Fill_3_Other_Trap restored; retry; nop;nop;nop;nop;nop;nop; | |
115 | ||
116 | #define H_T0_Window_Fill_4_Other_Trap | |
117 | #define SUN_H_T0_Window_Fill_4_Other_Trap restored; retry; nop;nop;nop;nop;nop;nop; | |
118 | ||
119 | #define H_T0_Window_Fill_5_Other_Trap | |
120 | #define SUN_H_T0_Window_Fill_5_Other_Trap restored; retry; nop;nop;nop;nop;nop;nop; | |
121 | ||
122 | #define H_T0_Window_Fill_6_Other_Trap | |
123 | #define SUN_H_T0_Window_Fill_6_Other_Trap restored; retry; nop;nop;nop;nop;nop;nop; | |
124 | ||
125 | #define H_T0_Window_Fill_7_Other_Trap | |
126 | #define SUN_H_T0_Window_Fill_7_Other_Trap restored; retry; nop;nop;nop;nop;nop;nop; | |
127 | ||
128 | #define H_T1_Window_Spill_0_Normal_0x80 | |
129 | #define SUN_H_T1_Window_Spill_0_Normal_0x80 saved; retry; nop;nop;nop;nop;nop;nop; | |
130 | ||
131 | #define H_T1_Window_Spill_1_Normal_0x84 | |
132 | #define SUN_H_T1_Window_Spill_1_Normal_0x84 saved; retry; nop;nop;nop;nop;nop;nop; | |
133 | ||
134 | #define H_T1_Window_Spill_2_Normal_0x88 | |
135 | #define SUN_H_T1_Window_Spill_2_Normal_0x88 saved; retry; nop;nop;nop;nop;nop;nop; | |
136 | ||
137 | #define H_T1_Window_Spill_3_Normal_0x8c | |
138 | #define SUN_H_T1_Window_Spill_3_Normal_0x8c saved; retry; nop;nop;nop;nop;nop;nop; | |
139 | ||
140 | #define H_T1_Window_Spill_4_Normal_0x90 | |
141 | #define SUN_H_T1_Window_Spill_4_Normal_0x90 saved; retry; nop;nop;nop;nop;nop;nop; | |
142 | ||
143 | #define H_T1_Window_Spill_5_Normal_0x94 | |
144 | #define SUN_H_T1_Window_Spill_5_Normal_0x94 saved; retry; nop;nop;nop;nop;nop;nop; | |
145 | ||
146 | #define H_T1_Window_Spill_6_Normal_0x98 | |
147 | #define SUN_H_T1_Window_Spill_6_Normal_0x98 saved; retry; nop;nop;nop;nop;nop;nop; | |
148 | ||
149 | #define H_T1_Window_Spill_7_Normal_0x9c | |
150 | #define SUN_H_T1_Window_Spill_7_Normal_0x9c saved; retry; nop;nop;nop;nop;nop;nop; | |
151 | ||
152 | #define H_T1_Window_Spill_0_Other_0xa0 | |
153 | #define SUN_H_T1_Window_Spill_0_Other_0xa0 saved; retry; nop;nop;nop;nop;nop;nop; | |
154 | ||
155 | #define H_T1_Window_Spill_1_Other_0xa4 | |
156 | #define SUN_H_T1_Window_Spill_1_Other_0xa4 saved; retry; nop;nop;nop;nop;nop;nop; | |
157 | ||
158 | #define H_T1_Window_Spill_2_Other_0xa8 | |
159 | #define SUN_H_T1_Window_Spill_2_Other_0xa8 saved; retry; nop;nop;nop;nop;nop;nop; | |
160 | ||
161 | #define H_T1_Window_Spill_3_Other_0xac | |
162 | #define SUN_H_T1_Window_Spill_3_Other_0xac saved; retry; nop;nop;nop;nop;nop;nop; | |
163 | ||
164 | #define H_T1_Window_Spill_4_Other_0xb0 | |
165 | #define SUN_H_T1_Window_Spill_4_Other_0xb0 saved; retry; nop;nop;nop;nop;nop;nop; | |
166 | ||
167 | #define H_T1_Window_Spill_5_Other_0xb4 | |
168 | #define SUN_H_T1_Window_Spill_5_Other_0xb4 saved; retry; nop;nop;nop;nop;nop;nop; | |
169 | ||
170 | #define H_T1_Window_Spill_6_Other_0xb8 | |
171 | #define SUN_H_T1_Window_Spill_6_Other_0xb8 saved; retry; nop;nop;nop;nop;nop;nop; | |
172 | ||
173 | #define H_T1_Window_Spill_7_Other_0xbc | |
174 | #define SUN_H_T1_Window_Spill_7_Other_0xbc saved; retry; nop;nop;nop;nop;nop;nop; | |
175 | ||
176 | #define H_T1_Window_Fill_0_Normal_0xc0 | |
177 | #define SUN_H_T1_Window_Fill_0_Normal_0xc0 restored; retry; nop;nop;nop;nop;nop;nop; | |
178 | ||
179 | #define H_T1_Window_Fill_1_Normal_0xc4 | |
180 | #define SUN_H_T1_Window_Fill_1_Normal_0xc4 restored; retry; nop;nop;nop;nop;nop;nop; | |
181 | ||
182 | #define H_T1_Window_Fill_2_Normal_0xc8 | |
183 | #define SUN_H_T1_Window_Fill_2_Normal_0xc8 restored; retry; nop;nop;nop;nop;nop;nop; | |
184 | ||
185 | #define H_T1_Window_Fill_3_Normal_0xcc | |
186 | #define SUN_H_T1_Window_Fill_3_Normal_0xcc restored; retry; nop;nop;nop;nop;nop;nop; | |
187 | ||
188 | #define H_T1_Window_Fill_4_Normal_0xd0 | |
189 | #define SUN_H_T1_Window_Fill_4_Normal_0xd0 restored; retry; nop;nop;nop;nop;nop;nop; | |
190 | ||
191 | #define H_T1_Window_Fill_5_Normal_0xd4 | |
192 | #define SUN_H_T1_Window_Fill_5_Normal_0xd4 restored; retry; nop;nop;nop;nop;nop;nop; | |
193 | ||
194 | #define H_T1_Window_Fill_6_Normal_0xd8 | |
195 | #define SUN_H_T1_Window_Fill_6_Normal_0xd8 restored; retry; nop;nop;nop;nop;nop;nop; | |
196 | ||
197 | #define H_T1_Window_Fill_7_Normal_0xdc | |
198 | #define SUN_H_T1_Window_Fill_7_Normal_0xdc restored; retry; nop;nop;nop;nop;nop;nop; | |
199 | ||
200 | #define H_T1_Window_Fill_0_Other_0xe0 | |
201 | #define SUN_H_T1_Window_Fill_0_Other_0xe0 restored; retry; nop;nop;nop;nop;nop;nop; | |
202 | ||
203 | #define H_T1_Window_Fill_1_Other_0xe4 | |
204 | #define SUN_H_T1_Window_Fill_1_Other_0xe4 restored; retry; nop;nop;nop;nop;nop;nop; | |
205 | ||
206 | #define H_T1_Window_Fill_2_Other_0xe8 | |
207 | #define SUN_H_T1_Window_Fill_2_Other_0xe8 restored; retry; nop;nop;nop;nop;nop;nop; | |
208 | ||
209 | #define H_T1_Window_Fill_3_Other_0xec | |
210 | #define SUN_H_T1_Window_Fill_3_Other_0xec restored; retry; nop;nop;nop;nop;nop;nop; | |
211 | ||
212 | #define H_T1_Window_Fill_4_Other_0xf0 | |
213 | #define SUN_H_T1_Window_Fill_4_Other_0xf0 restored; retry; nop;nop;nop;nop;nop;nop; | |
214 | ||
215 | #define H_T1_Window_Fill_5_Other_0xf4 | |
216 | #define SUN_H_T1_Window_Fill_5_Other_0xf4 restored; retry; nop;nop;nop;nop;nop;nop; | |
217 | ||
218 | #define H_T1_Window_Fill_6_Other_0xf8 | |
219 | #define SUN_H_T1_Window_Fill_6_Other_0xf8 restored; retry; nop;nop;nop;nop;nop;nop; | |
220 | ||
221 | #define H_T1_Window_Fill_7_Other_0xfc | |
222 | #define SUN_H_T1_Window_Fill_7_Other_0xfc restored; retry; nop;nop;nop;nop;nop;nop; | |
223 | ||
224 | #define H_T0_Trap_Instruction_0 | |
225 | #define My_T0_Trap_Instruction_0 \ | |
226 | rdpr %tnpc, %g2; \ | |
227 | save %i7, %g0, %i7; \ | |
228 | wrpr %g2, %tpc; \ | |
229 | add %g2, 4, %g2;\ | |
230 | wrpr %g2, %tnpc; \ | |
231 | restore %i7, %g0, %i7; \ | |
232 | stw %g2, [%i7];\ | |
233 | retry | |
234 | #define H_T0_Trap_Instruction_1 | |
235 | #define My_T0_Trap_Instruction_1 \ | |
236 | umul %o4, 2, %o5;\ | |
237 | rdpr %tnpc, %g2; \ | |
238 | wrpr %g2, %tpc; \ | |
239 | add %g2, 4, %g2;\ | |
240 | wrpr %g2, %tnpc; \ | |
241 | stw %g2, [%i7];\ | |
242 | illtrap;\ | |
243 | retry | |
244 | #define H_T0_Trap_Instruction_2 | |
245 | #define My_T0_Trap_Instruction_2 \ | |
246 | inc %o3;\ | |
247 | umul %o3, 2, %o4;\ | |
248 | ba 1f; \ | |
249 | save %i7, %g0, %i7; \ | |
250 | 2: done; \ | |
251 | nop; \ | |
252 | 1: ba 2b; \ | |
253 | restore %i7, %g0, %i7 | |
254 | #define H_T0_Trap_Instruction_3 | |
255 | #define My_T0_Trap_Instruction_3 \ | |
256 | inc %l3;\ | |
257 | inc %o3;\ | |
258 | umul %o3, 2, %o4;\ | |
259 | stw %o4, [%i7];\ | |
260 | save %i7, %g0, %i7 ;\ | |
261 | restore %i7, %g0, %i7 ;\ | |
262 | done ;\ | |
263 | nop; | |
264 | #define H_T0_Trap_Instruction_4 | |
265 | #define My_T0_Trap_Instruction_4 \ | |
266 | umul %i4, 2, %l5;\ | |
267 | inc %o1;\ | |
268 | rdpr %tnpc, %g2; \ | |
269 | wrpr %g2, %tpc; \ | |
270 | add %g2, 4, %g2;\ | |
271 | wrpr %g2, %tnpc; \ | |
272 | retry ;\ | |
273 | illtrap | |
274 | #define H_T0_Trap_Instruction_5 | |
275 | #define My_T0_Trap_Instruction_5 \ | |
276 | umul %i7, 2, %l1;\ | |
277 | inc %o5;\ | |
278 | rdpr %tnpc, %g2; \ | |
279 | wrpr %g2, %tpc; \ | |
280 | add %g2, 4, %g2;\ | |
281 | wrpr %g2, %tnpc; \ | |
282 | sdiv %r2, %r10, %r0; \ | |
283 | retry | |
284 | ||
285 | #define H_T1_Trap_Instruction_0 | |
286 | #define My_T1_Trap_Instruction_0 \ | |
287 | inc %o4;\ | |
288 | umul %o4, 2, %o5;\ | |
289 | ba 3f; \ | |
290 | save %i7, %g0, %i7; \ | |
291 | 4: done; \ | |
292 | nop; \ | |
293 | 3: ba 4b; \ | |
294 | restore %i7, %g0, %i7 | |
295 | #define H_T1_Trap_Instruction_1 | |
296 | #define My_T1_Trap_Instruction_1 \ | |
297 | umul %o4, 2, %o5;\ | |
298 | rdpr %tnpc, %g2; \ | |
299 | wrpr %g2, %tpc; \ | |
300 | add %g2, 4, %g2;\ | |
301 | stw %g2, [%i7];\ | |
302 | wrpr %g2, %tnpc; \ | |
303 | restore %i7, %g0, %i7 ;;\ | |
304 | retry | |
305 | #define H_T1_Trap_Instruction_2 | |
306 | #define My_T1_Trap_Instruction_2 \ | |
307 | inc %o3;\ | |
308 | umul %o3, 2, %o4;\ | |
309 | ba 5f; \ | |
310 | save %i7, %g0, %i7; \ | |
311 | 6: done; \ | |
312 | nop; \ | |
313 | 5: ba 6b; \ | |
314 | restore %i7, %g0, %i7 | |
315 | #define H_T1_Trap_Instruction_3 | |
316 | #define My_T1_Trap_Instruction_3 \ | |
317 | inc %l3;\ | |
318 | inc %o3;\ | |
319 | umul %o3, 2, %o4;\ | |
320 | inc %i3;\ | |
321 | save %i7, %g0, %i7 ;\ | |
322 | restore %i7, %g0, %i7 ;\ | |
323 | done ;\ | |
324 | nop; | |
325 | #define H_T1_Trap_Instruction_4 | |
326 | #define My_T1_Trap_Instruction_4 \ | |
327 | umul %i4, 2, %l5;\ | |
328 | rdpr %tnpc, %g2; \ | |
329 | wrpr %g2, %tpc; \ | |
330 | stw %g2, [%i7];\ | |
331 | add %g2, 4, %g2;\ | |
332 | wrpr %g2, %tnpc; \ | |
333 | retry ;\ | |
334 | illtrap | |
335 | #define H_T1_Trap_Instruction_5 | |
336 | #define My_T1_Trap_Instruction_5 \ | |
337 | umul %i7, 2, %l1;\ | |
338 | inc %o5;\ | |
339 | rdpr %tnpc, %g2; \ | |
340 | wrpr %g2, %tpc; \ | |
341 | add %g2, 4, %g2;\ | |
342 | wrpr %g2, %tnpc; \ | |
343 | sdiv %r2, %r10, %r0; \ | |
344 | retry | |
345 | ||
346 | #define H_HT0_Trap_Instruction_0 | |
347 | #define My_HT0_Trap_Instruction_0 \ | |
348 | rd %asi, %g2;\ | |
349 | mov 8, %g3;\ | |
350 | stxa %g3, [%g0] 0x57;\ | |
351 | stw %g2, [%i7];\ | |
352 | done;\ | |
353 | nop;nop;nop | |
354 | ||
355 | #define H_HT0_Trap_Instruction_1 | |
356 | #define My_HT0_Trap_Instruction_1 \ | |
357 | rd %asi, %g2;\ | |
358 | mov 8, %g3;\ | |
359 | stxa %g3, [%g0] 0x5f;\ | |
360 | done;\ | |
361 | nop;nop;nop;nop | |
362 | #define H_HT0_Trap_Instruction_2 | |
363 | #define My_HT0_Trap_Instruction_2 \ | |
364 | umul %i6, 2, %l4;\ | |
365 | stw %l4, [%i7];\ | |
366 | rdpr %tnpc, %g2; \ | |
367 | wrpr %g2, %tpc; \ | |
368 | add %g2, 4, %g2;\ | |
369 | wrpr %g2, %tnpc; \ | |
370 | sdiv %r2, %r0, %r0; \ | |
371 | retry | |
372 | #define H_HT0_Trap_Instruction_3 | |
373 | #define My_HT0_Trap_Instruction_3 \ | |
374 | umul %i5, 3, %l3;\ | |
375 | inc %o6;\ | |
376 | illtrap ;\ | |
377 | rdpr %tnpc, %g2; \ | |
378 | wrpr %g2, %tpc; \ | |
379 | add %g2, 4, %g2;\ | |
380 | wrpr %g2, %tnpc; \ | |
381 | retry | |
382 | #define H_HT0_Trap_Instruction_4 | |
383 | #define My_HT0_Trap_Instruction_4 \ | |
384 | rdpr %tnpc, %g2; \ | |
385 | save %i7, %g0, %i7; \ | |
386 | wrpr %g2, %tpc; \ | |
387 | add %g2, 4, %g2;\ | |
388 | stw %g2, [%i7];\ | |
389 | wrpr %g2, %tnpc; \ | |
390 | restore %i7, %g0, %i7 ;\ | |
391 | retry | |
392 | #define H_HT0_Trap_Instruction_5 | |
393 | #define My_HT0_Trap_Instruction_5 \ | |
394 | ba htrap_5_ext;\ | |
395 | nop; retry;\ | |
396 | nop; nop; nop; nop; nop | |
397 | ||
398 | #define H_HT0_Mem_Address_Not_Aligned_0x34 | |
399 | #define My_HT0_Mem_Address_Not_Aligned_0x34 \ | |
400 | umul %i7, 4, %g1;\ | |
401 | inc %o6;\ | |
402 | umul %i4, 3, %l3;\ | |
403 | inc %g6;\ | |
404 | save %i7, %g0, %i7 ;\ | |
405 | restore %i7, %g0, %i7 ;\ | |
406 | done ;\ | |
407 | nop; | |
408 | #define H_HT0_Illegal_instruction_0x10 | |
409 | #define My_HT0_Illegal_instruction_0x10 \ | |
410 | umul %i0, 4, %g1;\ | |
411 | inc %o6;\ | |
412 | ba 7f; \ | |
413 | rdhpr %htstate, %g3;\ | |
414 | 8: done; \ | |
415 | 7: ba 8b;\ | |
416 | wrhpr %g3, 1, %htstate;nop | |
417 | ||
418 | #define H_HT0_DAE_so_page_0x30 | |
419 | #define My_HT0_DAE_so_page_0x30 \ | |
420 | umul %i5, 4, %g5;\ | |
421 | inc %g6;\ | |
422 | save %i7, %g0, %i7; \ | |
423 | restore %i7, %g0, %i7;\ | |
424 | rd %fprs, %g2; \ | |
425 | wr %g2, 0x4, %fprs ;\ | |
426 | done; \ | |
427 | nop; | |
428 | #define H_HT0_DAE_invalid_asi_0x14 | |
429 | #define SUN_H_HT0_DAE_invalid_asi_0x14 \ | |
430 | umul %i5, 4, %g5;\ | |
431 | inc %g6;\ | |
432 | save %i7, %g0, %i7; \ | |
433 | restore %i7, %g0, %i7;\ | |
434 | rd %fprs, %g2; \ | |
435 | wr %g2, 0x4, %fprs ;\ | |
436 | done; \ | |
437 | nop; | |
438 | #define H_HT0_DAE_privilege_violation_0x15 | |
439 | #define SUN_H_HT0_DAE_privilege_violation_0x15 \ | |
440 | umul %i5, 4, %g5;\ | |
441 | inc %g6;\ | |
442 | save %i7, %g0, %i7; \ | |
443 | restore %i7, %g0, %i7;\ | |
444 | rd %fprs, %g2; \ | |
445 | wr %g2, 0x4, %fprs ;\ | |
446 | done; \ | |
447 | nop; | |
448 | #define H_HT0_Privileged_Action_0x37 | |
449 | #define My_HT0_Privileged_Action_0x37 \ | |
450 | inc %l5;\ | |
451 | dec %g3;\ | |
452 | umul %i5, 4, %g5;\ | |
453 | save %i7, %g0, %i7; \ | |
454 | restore %i7, %g0, %i7;\ | |
455 | done; \ | |
456 | nop; nop | |
457 | #define H_HT0_Lddf_Mem_Address_Not_Aligned_0x35 | |
458 | #define My_HT0_Lddf_Mem_Address_Not_Aligned_0x35 \ | |
459 | inc %l5;\ | |
460 | dec %g3;\ | |
461 | rdpr %tpc, %g2; \ | |
462 | add %g2, 0x4, %g2; \ | |
463 | wrpr %g2, %tpc; \ | |
464 | add %g2, 0x4, %g2; \ | |
465 | wrpr %g2, %tnpc; \ | |
466 | retry | |
467 | #define H_HT0_Stdf_Mem_Address_Not_Aligned_0x36 | |
468 | #define My_HT0_Stdf_Mem_Address_Not_Aligned_0x36 \ | |
469 | inc %l5;\ | |
470 | dec %g3;\ | |
471 | rdpr %tpc, %g2; \ | |
472 | add %g2, 0x4, %g2; \ | |
473 | wrpr %g2, %tpc; \ | |
474 | add %g2, 0x4, %g2; \ | |
475 | wrpr %g2, %tnpc; \ | |
476 | retry | |
477 | #define H_HT0_Fp_exception_other_0x22 | |
478 | #define My_HT0_Fp_exception_other_0x22 \ | |
479 | inc %l6;\ | |
480 | dec %g5;\ | |
481 | umul %i5, 4, %g2;\ | |
482 | save %i7, %g0, %i7; \ | |
483 | restore %i7, %g0, %i7;\ | |
484 | stw %g2, [%i7];\ | |
485 | done; \ | |
486 | nop | |
487 | #define H_HT0_Division_By_Zero | |
488 | #define My_HT0_Division_By_Zero \ | |
489 | inc %l6;\ | |
490 | dec %g5;\ | |
491 | umul %i5, 4, %g2;\ | |
492 | save %i7, %g0, %i7; \ | |
493 | restore %i7, %g0, %i7;\ | |
494 | done; \ | |
495 | nop; nop | |
496 | #define H_T0_Division_By_Zero | |
497 | #define My_T0_Division_By_Zero \ | |
498 | inc %l6;\ | |
499 | dec %g5;\ | |
500 | umul %i5, 4, %g2;\ | |
501 | save %i7, %g0, %i7; \ | |
502 | restore %i7, %g0, %i7;\ | |
503 | done; \ | |
504 | nop; nop | |
505 | #define H_T1_Division_By_Zero_0x28 | |
506 | #define My_H_T1_Division_By_Zero_0x28 \ | |
507 | inc %l6;\ | |
508 | dec %g5;\ | |
509 | umul %i5, 4, %g2;\ | |
510 | save %i7, %g0, %i7; \ | |
511 | restore %i7, %g0, %i7;\ | |
512 | done; \ | |
513 | nop; nop | |
514 | ||
515 | #define H_T0_Division_By_Zero | |
516 | #define My_T0_Division_By_Zero\ | |
517 | inc %l6;\ | |
518 | dec %g5;\ | |
519 | umul %i5, 4, %g2;\ | |
520 | save %i7, %g0, %i7; \ | |
521 | restore %i7, %g0, %i7;\ | |
522 | done; \ | |
523 | nop; nop | |
524 | ||
525 | #define H_T1_Fp_Exception_Other_0x22 | |
526 | #define My_H_T1_Fp_Exception_Other_0x22 \ | |
527 | inc %l6;\ | |
528 | dec %g5;\ | |
529 | umul %i5, 4, %g2;\ | |
530 | save %i7, %g0, %i7; \ | |
531 | restore %i7, %g0, %i7;\ | |
532 | done; \ | |
533 | nop; nop | |
534 | #define H_T1_Privileged_Opcode_0x11 | |
535 | #define SUN_H_T1_Privileged_Opcode_0x11 \ | |
536 | inc %l6;\ | |
537 | dec %g5;\ | |
538 | stw %g5, [%i7];\ | |
539 | umul %i5, 4, %g2;\ | |
540 | restore %i7, %g0, %i7;\ | |
541 | save %i7, %g0, %i7; \ | |
542 | done; \ | |
543 | nop; | |
544 | ||
545 | #define H_HT0_Privileged_opcode_0x11 | |
546 | #define My_HT0_Privileged_opcode_0x11 \ | |
547 | xor %i0, %l1, %g1;\ | |
548 | and %g1, 0xf, %g1; \ | |
549 | ba hh11_1; \ | |
550 | not %g0, %g2; \ | |
551 | hh11_2: done; \ | |
552 | hh11_1: xor %g1, %g2, %g2; \ | |
553 | ba hh11_2; \ | |
554 | jmp %g2; | |
555 | ||
556 | #define H_HT0_Fp_disabled_0x20 | |
557 | #define My_HT0_Fp_disabled_0x20 \ | |
558 | mov 0x4, %g2 ;\ | |
559 | wr %g2, 0x0, %fprs ;\ | |
560 | sllx %g2, 10, %g3; \ | |
561 | rdpr %tstate, %g2;\ | |
562 | or %g2, %g3, %g2 ;\ | |
563 | stw %g2, [%i7];\ | |
564 | wrpr %g2, 0x0, %tstate;\ | |
565 | retry; | |
566 | ||
567 | #define H_T0_Fp_disabled_0x20 | |
568 | #define My_T0_Fp_disabled_0x20 \ | |
569 | mov 0x4, %g2 ;\ | |
570 | wr %g2, 0x0, %fprs ;\ | |
571 | sllx %g2, 10, %g3; \ | |
572 | rdpr %tstate, %g2;\ | |
573 | or %g2, %g3, %g2 ;\ | |
574 | wrpr %g2, 0x0, %tstate;\ | |
575 | retry; nop | |
576 | ||
577 | #define H_T1_Fp_Disabled_0x20 | |
578 | #define My_H_T1_Fp_Disabled_0x20 \ | |
579 | mov 0x4, %g2 ;\ | |
580 | wr %g2, 0x0, %fprs ;\ | |
581 | sllx %g2, 10, %g3; \ | |
582 | rdpr %tstate, %g2;\ | |
583 | or %g2, %g3, %g2 ;\ | |
584 | wrpr %g2, 0x0, %tstate;\ | |
585 | stw %g2, [%i7];\ | |
586 | retry | |
587 | ||
588 | #define H_HT0_Watchdog_Reset_0x02 | |
589 | #define My_HT0_Watchdog_Reset_0x02 \ | |
590 | ba wdog_2_ext;\ | |
591 | nop;retry;nop;nop;nop; | |
592 | ||
593 | #define H_T0_Privileged_opcode_0x11 | |
594 | #define My_T0_Privileged_opcode_0x11 \ | |
595 | xor %i0, %l1, %g1;\ | |
596 | and %g1, 0xf, %g1; \ | |
597 | ba h11_1; \ | |
598 | not %g0, %g2; \ | |
599 | h11_2: done; \ | |
600 | h11_1: xor %g1, %g2, %g2; \ | |
601 | ba h11_2; \ | |
602 | jmp %g2; | |
603 | ||
604 | #define H_T1_Fp_exception_other_0x22 | |
605 | #define My_T1_Fp_exception_other_0x22 \ | |
606 | inc %l6;\ | |
607 | dec %g5;\ | |
608 | umul %i5, 4, %g2;\ | |
609 | restore %i7, %g0, %i7 ; \ | |
610 | save %i7, %g0, %i7; \ | |
611 | restore %i7, %g0, %i7;\ | |
612 | ldx [%g2], %g2;\ | |
613 | done; | |
614 | ||
615 | #define H_T0_Fp_exception_other_0x22 | |
616 | #define My_T0_Fp_exception_other_0x22 \ | |
617 | inc %l6;\ | |
618 | dec %g5;\ | |
619 | umul %i5, 4, %g2;\ | |
620 | save %i7, %g0, %i7; \ | |
621 | restore %i7, %g0, %i7;\ | |
622 | stw %g2, [%i7];\ | |
623 | done; \ | |
624 | nop | |
625 | ||
626 | #define H_HT0_Trap_Level_Zero_0x5f | |
627 | #define My_HT0_Trap_Level_Zero_0x5f \ | |
628 | not %g0, %g2; \ | |
629 | rdhpr %hpstate, %g3;\ | |
630 | jmp %g2;\ | |
631 | rdhpr %htstate, %g3;\ | |
632 | and %g3, 0xfe, %g3;\ | |
633 | wrhpr %g3, 0, %htstate;\ | |
634 | stw %g2, [%i7];\ | |
635 | retry | |
636 | ||
637 | #define My_Watchdog_Reset | |
638 | #define My_Watchdog_Reset \ | |
639 | ba wdog_red_ext;\ | |
640 | nop;retry;nop;nop;nop;nop;nop | |
641 | ||
642 | #define H_HT0_Control_Transfer_Instr_0x74 | |
643 | #define My_H_HT0_Control_Transfer_Instr_0x74 \ | |
644 | rdpr %tstate, %l3;\ | |
645 | and %l3, 0xfff, %l3;\ | |
646 | wrpr %l3, %tstate ;\ | |
647 | done;nop; | |
648 | ||
649 | #define H_T0_Control_Transfer_Instr_0x74 | |
650 | #define My_H_T0_Control_Transfer_Instr_0x74 \ | |
651 | done;nop; | |
652 | ||
653 | #define H_T1_Control_Transfer_Instr_0x74 | |
654 | #define My_H_T1_Control_Transfer_Instr_0x74 \ | |
655 | done;nop; | |
656 | ||
657 | ||
658 | #define H_HT0_Instruction_address_range_0x0d | |
659 | #define SUN_H_HT0_Instruction_address_range_0x0d \ | |
660 | done;nop | |
661 | ||
662 | #define H_HT0_mem_address_range_0x2e | |
663 | #define SUN_H_HT0_mem_address_range_0x2e \ | |
664 | done;nop | |
665 | ||
666 | ||
667 | !!!!!!!!!!!!!!!!!!!!!! END of all handlers !!!!!!!!!!!!!!!!!!! | |
668 | ||
669 | #include "hboot.s" | |
670 | .text | |
671 | .global main | |
672 | main: | |
673 | ||
674 | ! Set up ld/st area per thread | |
675 | ta T_RD_THID ! Result in %o1 = r9 | |
676 | umul %r9, 256, %r31 | |
677 | setx user_data_start, %r1, %r3 | |
678 | add %r31, %r3, %r31 | |
679 | wr %r0, 0x4, %asi | |
680 | ||
681 | !Initializing integer registers | |
682 | ldx [%r31+0], %r0 | |
683 | ldx [%r31+8], %r1 | |
684 | ldx [%r31+16], %r2 | |
685 | ldx [%r31+24], %r3 | |
686 | ldx [%r31+32], %r4 | |
687 | ldx [%r31+40], %r5 | |
688 | ldx [%r31+48], %r6 | |
689 | ldx [%r31+56], %r7 | |
690 | ldx [%r31+64], %r8 | |
691 | ldx [%r31+72], %r9 | |
692 | ldx [%r31+80], %r10 | |
693 | ldx [%r31+88], %r11 | |
694 | ldx [%r31+96], %r12 | |
695 | ldx [%r31+104], %r13 | |
696 | ldx [%r31+112], %r14 | |
697 | mov %r31, %r15 | |
698 | ldx [%r31+128], %r16 | |
699 | ldx [%r31+136], %r17 | |
700 | ldx [%r31+144], %r18 | |
701 | ldx [%r31+152], %r19 | |
702 | ldx [%r31+160], %r20 | |
703 | ldx [%r31+168], %r21 | |
704 | ldx [%r31+176], %r22 | |
705 | ldx [%r31+184], %r23 | |
706 | ldx [%r31+192], %r24 | |
707 | ldx [%r31+200], %r25 | |
708 | ldx [%r31+208], %r26 | |
709 | ldx [%r31+216], %r27 | |
710 | ldx [%r31+224], %r28 | |
711 | ldx [%r31+232], %r29 | |
712 | mov 0xb2, %r14 | |
713 | mov 0x33, %r30 | |
714 | save %r31, %r0, %r31 | |
715 | ldx [%r31+0], %r0 | |
716 | ldx [%r31+8], %r1 | |
717 | ldx [%r31+16], %r2 | |
718 | ldx [%r31+24], %r3 | |
719 | ldx [%r31+32], %r4 | |
720 | ldx [%r31+40], %r5 | |
721 | ldx [%r31+48], %r6 | |
722 | ldx [%r31+56], %r7 | |
723 | ldx [%r31+64], %r8 | |
724 | ldx [%r31+72], %r9 | |
725 | ldx [%r31+80], %r10 | |
726 | ldx [%r31+88], %r11 | |
727 | ldx [%r31+96], %r12 | |
728 | ldx [%r31+104], %r13 | |
729 | ldx [%r31+112], %r14 | |
730 | mov %r31, %r15 | |
731 | ldx [%r31+128], %r16 | |
732 | ldx [%r31+136], %r17 | |
733 | ldx [%r31+144], %r18 | |
734 | ldx [%r31+152], %r19 | |
735 | ldx [%r31+160], %r20 | |
736 | ldx [%r31+168], %r21 | |
737 | ldx [%r31+176], %r22 | |
738 | ldx [%r31+184], %r23 | |
739 | ldx [%r31+192], %r24 | |
740 | ldx [%r31+200], %r25 | |
741 | ldx [%r31+208], %r26 | |
742 | ldx [%r31+216], %r27 | |
743 | ldx [%r31+224], %r28 | |
744 | ldx [%r31+232], %r29 | |
745 | mov 0x30, %r14 | |
746 | mov 0xb4, %r30 | |
747 | save %r31, %r0, %r31 | |
748 | ldx [%r31+0], %r0 | |
749 | ldx [%r31+8], %r1 | |
750 | ldx [%r31+16], %r2 | |
751 | ldx [%r31+24], %r3 | |
752 | ldx [%r31+32], %r4 | |
753 | ldx [%r31+40], %r5 | |
754 | ldx [%r31+48], %r6 | |
755 | ldx [%r31+56], %r7 | |
756 | ldx [%r31+64], %r8 | |
757 | ldx [%r31+72], %r9 | |
758 | ldx [%r31+80], %r10 | |
759 | ldx [%r31+88], %r11 | |
760 | ldx [%r31+96], %r12 | |
761 | ldx [%r31+104], %r13 | |
762 | ldx [%r31+112], %r14 | |
763 | mov %r31, %r15 | |
764 | ldx [%r31+128], %r16 | |
765 | ldx [%r31+136], %r17 | |
766 | ldx [%r31+144], %r18 | |
767 | ldx [%r31+152], %r19 | |
768 | ldx [%r31+160], %r20 | |
769 | ldx [%r31+168], %r21 | |
770 | ldx [%r31+176], %r22 | |
771 | ldx [%r31+184], %r23 | |
772 | ldx [%r31+192], %r24 | |
773 | ldx [%r31+200], %r25 | |
774 | ldx [%r31+208], %r26 | |
775 | ldx [%r31+216], %r27 | |
776 | ldx [%r31+224], %r28 | |
777 | ldx [%r31+232], %r29 | |
778 | mov 0xb4, %r14 | |
779 | mov 0x35, %r30 | |
780 | save %r31, %r0, %r31 | |
781 | ldx [%r31+0], %r0 | |
782 | ldx [%r31+8], %r1 | |
783 | ldx [%r31+16], %r2 | |
784 | ldx [%r31+24], %r3 | |
785 | ldx [%r31+32], %r4 | |
786 | ldx [%r31+40], %r5 | |
787 | ldx [%r31+48], %r6 | |
788 | ldx [%r31+56], %r7 | |
789 | ldx [%r31+64], %r8 | |
790 | ldx [%r31+72], %r9 | |
791 | ldx [%r31+80], %r10 | |
792 | ldx [%r31+88], %r11 | |
793 | ldx [%r31+96], %r12 | |
794 | ldx [%r31+104], %r13 | |
795 | ldx [%r31+112], %r14 | |
796 | mov %r31, %r15 | |
797 | ldx [%r31+128], %r16 | |
798 | ldx [%r31+136], %r17 | |
799 | ldx [%r31+144], %r18 | |
800 | ldx [%r31+152], %r19 | |
801 | ldx [%r31+160], %r20 | |
802 | ldx [%r31+168], %r21 | |
803 | ldx [%r31+176], %r22 | |
804 | ldx [%r31+184], %r23 | |
805 | ldx [%r31+192], %r24 | |
806 | ldx [%r31+200], %r25 | |
807 | ldx [%r31+208], %r26 | |
808 | ldx [%r31+216], %r27 | |
809 | ldx [%r31+224], %r28 | |
810 | ldx [%r31+232], %r29 | |
811 | mov 0x33, %r14 | |
812 | mov 0x31, %r30 | |
813 | save %r31, %r0, %r31 | |
814 | ldx [%r31+0], %r0 | |
815 | ldx [%r31+8], %r1 | |
816 | ldx [%r31+16], %r2 | |
817 | ldx [%r31+24], %r3 | |
818 | ldx [%r31+32], %r4 | |
819 | ldx [%r31+40], %r5 | |
820 | ldx [%r31+48], %r6 | |
821 | ldx [%r31+56], %r7 | |
822 | ldx [%r31+64], %r8 | |
823 | ldx [%r31+72], %r9 | |
824 | ldx [%r31+80], %r10 | |
825 | ldx [%r31+88], %r11 | |
826 | ldx [%r31+96], %r12 | |
827 | ldx [%r31+104], %r13 | |
828 | ldx [%r31+112], %r14 | |
829 | mov %r31, %r15 | |
830 | ldx [%r31+128], %r16 | |
831 | ldx [%r31+136], %r17 | |
832 | ldx [%r31+144], %r18 | |
833 | ldx [%r31+152], %r19 | |
834 | ldx [%r31+160], %r20 | |
835 | ldx [%r31+168], %r21 | |
836 | ldx [%r31+176], %r22 | |
837 | ldx [%r31+184], %r23 | |
838 | ldx [%r31+192], %r24 | |
839 | ldx [%r31+200], %r25 | |
840 | ldx [%r31+208], %r26 | |
841 | ldx [%r31+216], %r27 | |
842 | ldx [%r31+224], %r28 | |
843 | ldx [%r31+232], %r29 | |
844 | mov 0xb5, %r14 | |
845 | mov 0x34, %r30 | |
846 | save %r31, %r0, %r31 | |
847 | ldx [%r31+0], %r0 | |
848 | ldx [%r31+8], %r1 | |
849 | ldx [%r31+16], %r2 | |
850 | ldx [%r31+24], %r3 | |
851 | ldx [%r31+32], %r4 | |
852 | ldx [%r31+40], %r5 | |
853 | ldx [%r31+48], %r6 | |
854 | ldx [%r31+56], %r7 | |
855 | ldx [%r31+64], %r8 | |
856 | ldx [%r31+72], %r9 | |
857 | ldx [%r31+80], %r10 | |
858 | ldx [%r31+88], %r11 | |
859 | ldx [%r31+96], %r12 | |
860 | ldx [%r31+104], %r13 | |
861 | ldx [%r31+112], %r14 | |
862 | mov %r31, %r15 | |
863 | ldx [%r31+128], %r16 | |
864 | ldx [%r31+136], %r17 | |
865 | ldx [%r31+144], %r18 | |
866 | ldx [%r31+152], %r19 | |
867 | ldx [%r31+160], %r20 | |
868 | ldx [%r31+168], %r21 | |
869 | ldx [%r31+176], %r22 | |
870 | ldx [%r31+184], %r23 | |
871 | ldx [%r31+192], %r24 | |
872 | ldx [%r31+200], %r25 | |
873 | ldx [%r31+208], %r26 | |
874 | ldx [%r31+216], %r27 | |
875 | ldx [%r31+224], %r28 | |
876 | ldx [%r31+232], %r29 | |
877 | mov 0x32, %r14 | |
878 | mov 0x35, %r30 | |
879 | save %r31, %r0, %r31 | |
880 | ldx [%r31+0], %r0 | |
881 | ldx [%r31+8], %r1 | |
882 | ldx [%r31+16], %r2 | |
883 | ldx [%r31+24], %r3 | |
884 | ldx [%r31+32], %r4 | |
885 | ldx [%r31+40], %r5 | |
886 | ldx [%r31+48], %r6 | |
887 | ldx [%r31+56], %r7 | |
888 | ldx [%r31+64], %r8 | |
889 | ldx [%r31+72], %r9 | |
890 | ldx [%r31+80], %r10 | |
891 | ldx [%r31+88], %r11 | |
892 | ldx [%r31+96], %r12 | |
893 | ldx [%r31+104], %r13 | |
894 | ldx [%r31+112], %r14 | |
895 | mov %r31, %r15 | |
896 | ldx [%r31+128], %r16 | |
897 | ldx [%r31+136], %r17 | |
898 | ldx [%r31+144], %r18 | |
899 | ldx [%r31+152], %r19 | |
900 | ldx [%r31+160], %r20 | |
901 | ldx [%r31+168], %r21 | |
902 | ldx [%r31+176], %r22 | |
903 | ldx [%r31+184], %r23 | |
904 | ldx [%r31+192], %r24 | |
905 | ldx [%r31+200], %r25 | |
906 | ldx [%r31+208], %r26 | |
907 | ldx [%r31+216], %r27 | |
908 | ldx [%r31+224], %r28 | |
909 | ldx [%r31+232], %r29 | |
910 | mov 0xb5, %r14 | |
911 | mov 0xb3, %r30 | |
912 | save %r31, %r0, %r31 | |
913 | restore | |
914 | restore | |
915 | restore | |
916 | !Initializing float registers | |
917 | ldd [%r31+0], %f0 | |
918 | ldd [%r31+16], %f2 | |
919 | ldd [%r31+32], %f4 | |
920 | ldd [%r31+48], %f6 | |
921 | ldd [%r31+64], %f8 | |
922 | ldd [%r31+80], %f10 | |
923 | ldd [%r31+96], %f12 | |
924 | ldd [%r31+112], %f14 | |
925 | ldd [%r31+128], %f16 | |
926 | ldd [%r31+144], %f18 | |
927 | ldd [%r31+160], %f20 | |
928 | ldd [%r31+176], %f22 | |
929 | ldd [%r31+192], %f24 | |
930 | ldd [%r31+208], %f26 | |
931 | ldd [%r31+224], %f28 | |
932 | ldd [%r31+240], %f30 | |
933 | ta T_CHANGE_HPRIV | |
934 | !Initializing Tick Cmprs | |
935 | mov 1, %g2 | |
936 | sllx %g2, 63, %g2 | |
937 | or %g1, %g2, %g1 | |
938 | wrhpr %g1, %g0, %hsys_tick_cmpr | |
939 | wr %g1, %g0, %tick_cmpr | |
940 | wr %g1, %g0, %sys_tick_cmpr | |
941 | !Initializing Trap Stack | |
942 | wrpr 0x1, %tl | |
943 | wrpr 0x1, %tt | |
944 | wrpr 0x1, %tpc | |
945 | wrpr 0x1, %tnpc | |
946 | wrpr 0x1, %tstate | |
947 | wrhpr 0x1, %htstate | |
948 | wrpr 0x2, %tl | |
949 | wrpr 0x1, %tt | |
950 | wrpr 0x1, %tpc | |
951 | wrpr 0x1, %tnpc | |
952 | wrpr 0x1, %tstate | |
953 | wrhpr 0x1, %htstate | |
954 | wrpr 0x3, %tl | |
955 | wrpr 0x1, %tt | |
956 | wrpr 0x1, %tpc | |
957 | wrpr 0x1, %tnpc | |
958 | wrpr 0x1, %tstate | |
959 | wrhpr 0x1, %htstate | |
960 | wrpr 0x4, %tl | |
961 | wrpr 0x1, %tt | |
962 | wrpr 0x1, %tpc | |
963 | wrpr 0x1, %tnpc | |
964 | wrpr 0x1, %tstate | |
965 | wrhpr 0x1, %htstate | |
966 | wrpr 0x5, %tl | |
967 | wrpr 0x1, %tt | |
968 | wrpr 0x1, %tpc | |
969 | wrpr 0x1, %tnpc | |
970 | wrpr 0x1, %tstate | |
971 | wrhpr 0x1, %htstate | |
972 | wrpr 0x6, %tl | |
973 | wrpr 0x1, %tt | |
974 | wrpr 0x1, %tpc | |
975 | wrpr 0x1, %tnpc | |
976 | wrpr 0x1, %tstate | |
977 | wrhpr 0x1, %htstate | |
978 | wrpr 0x0, %tl | |
979 | ta T_CHANGE_NONHPRIV | |
980 | .word 0xe2800be0 ! 1: LDUWA_R lduwa [%r0, %r0] 0x5f, %r17 | |
981 | splash_tba_0: | |
982 | ta T_CHANGE_PRIV | |
983 | set 0x003d0000, %r2 | |
984 | .word 0x8b900002 ! 2: WRPR_TBA_R wrpr %r0, %r2, %tba | |
985 | .word 0xe2c7e020 ! 3: LDSWA_I ldswa [%r31, + 0x0020] %asi, %r17 | |
986 | DS_1: | |
987 | nop | |
988 | not %g0, %g2 | |
989 | jmp %g2 | |
990 | .word 0x9d902005 ! 4: WRPR_WSTATE_I wrpr %r0, 0x0005, %wstate | |
991 | .word 0xaf494000 ! 5: RDHPR_HTBA rdhpr %htba, %r23 | |
992 | .word 0x8d802000 ! 6: WRFPRS_I wr %r0, 0x0000, %fprs | |
993 | .word 0xee1fe001 ! 7: LDD_I ldd [%r31 + 0x0001], %r23 | |
994 | .word 0x93902003 ! 8: WRPR_CWP_I wrpr %r0, 0x0003, %cwp | |
995 | invalw | |
996 | mov 0xb5, %r30 | |
997 | .word 0x91d0001e ! 9: Tcc_R ta icc_or_xcc, %r0 + %r30 | |
998 | .word 0xa745c000 ! 10: RD_TICK_CMPR_REG rd %-, %r19 | |
999 | .word 0xe69004a0 ! 11: LDUHA_R lduha [%r0, %r0] 0x25, %r19 | |
1000 | splash_tba_2: | |
1001 | ta T_CHANGE_PRIV | |
1002 | set 0x120000, %r2 | |
1003 | .word 0x8b900002 ! 12: WRPR_TBA_R wrpr %r0, %r2, %tba | |
1004 | .word 0x81982a94 ! 13: WRHPR_HPSTATE_I wrhpr %r0, 0x0a94, %hpstate | |
1005 | tagged_3: | |
1006 | taddcctv %r8, 0x114a, %r3 | |
1007 | .word 0xe607e001 ! 14: LDUW_I lduw [%r31 + 0x0001], %r19 | |
1008 | .word 0x879023b9 ! 15: WRPR_TT_I wrpr %r0, 0x03b9, %tt | |
1009 | .word 0xe61fc000 ! 16: LDD_R ldd [%r31 + %r0], %r19 | |
1010 | .word 0xe697e000 ! 17: LDUHA_I lduha [%r31, + 0x0000] %asi, %r19 | |
1011 | invalw | |
1012 | mov 0x31, %r30 | |
1013 | .word 0x91d0001e ! 18: Tcc_R ta icc_or_xcc, %r0 + %r30 | |
1014 | splash_lsu_4: | |
1015 | set 0xf, %r2 | |
1016 | stxa %r2, [%r0] ASI_LSU_CONTROL | |
1017 | .word 0x3d400001 ! 19: FBPULE fbule,a,pn %fcc0, <label_0x1> | |
1018 | ta T_CHANGE_HPRIV ! macro | |
1019 | splash_tba_5: | |
1020 | ta T_CHANGE_PRIV | |
1021 | set 0x120000, %r2 | |
1022 | .word 0x8b900002 ! 21: WRPR_TBA_R wrpr %r0, %r2, %tba | |
1023 | .word 0x8d802000 ! 22: WRFPRS_I wr %r0, 0x0000, %fprs | |
1024 | .word 0xe6800b00 ! 23: LDUWA_R lduwa [%r0, %r0] 0x58, %r19 | |
1025 | .word 0xe6c7e020 ! 24: LDSWA_I ldswa [%r31, + 0x0020] %asi, %r19 | |
1026 | .word 0x91d020b4 ! 25: Tcc_I ta icc_or_xcc, %r0 + 180 | |
1027 | change_to_randtl_6: | |
1028 | ta T_CHANGE_PRIV ! macro | |
1029 | .word 0x8f902000 ! 26: WRPR_TL_I wrpr %r0, 0x0000, %tl | |
1030 | .word 0xe61fe001 ! 27: LDD_I ldd [%r31 + 0x0001], %r19 | |
1031 | .word 0xaba0056b ! 28: FSQRTq fsqrt | |
1032 | .word 0x8d902337 ! 29: WRPR_PSTATE_I wrpr %r0, 0x0337, %pstate | |
1033 | .word 0x8d903eff ! 30: WRPR_PSTATE_I wrpr %r0, 0x1eff, %pstate | |
1034 | DS_7: | |
1035 | .word 0x22800001 ! 32: BE be,a <label_0x1> | |
1036 | .word 0x20800001 ! 32: BN bn,a <label_0x1> | |
1037 | .word 0xa3a00554 ! 32: FSQRTd fsqrt | |
1038 | .word 0x8fa40820 ! 31: FADDs fadds %f16, %f0, %f7 | |
1039 | .word 0xce17e001 ! 32: LDUH_I lduh [%r31 + 0x0001], %r7 | |
1040 | .word 0xcec00e40 ! 33: LDSWA_R ldswa [%r0, %r0] 0x72, %r7 | |
1041 | DS_8: | |
1042 | .word 0x34800001 ! 35: BG bg,a <label_0x1> | |
1043 | .word 0xc7312001 ! 35: STQF_I - %f3, [0x0001, %r4] | |
1044 | normalw | |
1045 | .word 0xb5458000 ! 34: RD_SOFTINT_REG rd %softint, %r26 | |
1046 | .word 0xa1902005 ! 35: WRPR_GL_I wrpr %r0, 0x0005, %- | |
1047 | .word 0xf41fe001 ! 36: LDD_I ldd [%r31 + 0x0001], %r26 | |
1048 | .word 0xf597e001 ! 37: LDQFA_I - [%r31, 0x0001], %f26 | |
1049 | splash_tba_9: | |
1050 | ta T_CHANGE_PRIV | |
1051 | set 0x003e0000, %r2 | |
1052 | .word 0x8b900002 ! 38: WRPR_TBA_R wrpr %r0, %r2, %tba | |
1053 | splash_tba_10: | |
1054 | ta T_CHANGE_PRIV | |
1055 | set 0x120000, %r2 | |
1056 | .word 0x8b900002 ! 39: WRPR_TBA_R wrpr %r0, %r2, %tba | |
1057 | splash_htba_11: | |
1058 | ta T_CHANGE_HPRIV | |
1059 | set 0x80000, %r2 | |
1060 | .word 0x8b980002 ! 40: WRHPR_HTBA_R wrhpr %r0, %r2, %htba | |
1061 | .word 0xf48008a0 ! 41: LDUWA_R lduwa [%r0, %r0] 0x45, %r26 | |
1062 | .word 0x8d903227 ! 42: WRPR_PSTATE_I wrpr %r0, 0x1227, %pstate | |
1063 | .word 0xf49fe001 ! 43: LDDA_I ldda [%r31, + 0x0001] %asi, %r26 | |
1064 | .word 0xf4c00e40 ! 44: LDSWA_R ldswa [%r0, %r0] 0x72, %r26 | |
1065 | .word 0xf49fe001 ! 45: LDDA_I ldda [%r31, + 0x0001] %asi, %r26 | |
1066 | .word 0xf597e001 ! 46: LDQFA_I - [%r31, 0x0001], %f26 | |
1067 | DS_12: | |
1068 | .word 0x20800001 ! 48: BN bn,a <label_0x1> | |
1069 | allclean | |
1070 | .word 0xb7b4c309 ! 47: ALLIGNADDRESS alignaddr %r19, %r9, %r27 | |
1071 | splash_lsu_13: | |
1072 | set 0x1f, %r2 | |
1073 | stxa %r2, [%r0] ASI_LSU_CONTROL | |
1074 | .word 0x3d400001 ! 48: FBPULE fbule,a,pn %fcc0, <label_0x1> | |
1075 | .word 0xf6c004a0 ! 49: LDSWA_R ldswa [%r0, %r0] 0x25, %r27 | |
1076 | ||
1077 | ||
1078 | .global user_data_start | |
1079 | .data | |
1080 | user_data_start: | |
1081 | .xword 0x417465975a111fda | |
1082 | .xword 0x53cc9d0b103d10b8 | |
1083 | .xword 0x987b66dcac462d54 | |
1084 | .xword 0x68aac5ec0e57c85e | |
1085 | .xword 0x988a0d76c9ccc0d5 | |
1086 | .xword 0x8a6dcbb289fe6b59 | |
1087 | .xword 0x782265a61791c71e | |
1088 | .xword 0xfaa6b88e5a2fe449 | |
1089 | .xword 0x6532c5c28318bd41 | |
1090 | .xword 0xf363f9d671da071d | |
1091 | .xword 0x448d7540d797c344 | |
1092 | .xword 0xf96cd3818fd80572 | |
1093 | .xword 0x685832b93c55376a | |
1094 | .xword 0x22aa702fa44a30d2 | |
1095 | .xword 0x9cd1284f64eb10aa | |
1096 | .xword 0x17eee7a840a1a177 | |
1097 | .xword 0x45cf98b2489731ee | |
1098 | .xword 0x7c8fa5bdac11ca85 | |
1099 | .xword 0xc556cc589cab8d42 | |
1100 | .xword 0x05c1d2d6afea5189 | |
1101 | .xword 0x8dbaa8ef87a11cad | |
1102 | .xword 0xdf36a05e42d52568 | |
1103 | .xword 0xa78ef51e7da696bd | |
1104 | .xword 0x5038b8dfee7eda72 | |
1105 | .xword 0xc072fefcb3949a67 | |
1106 | .xword 0x264318c843f63ebc | |
1107 | .xword 0x4f55c687b6a83444 | |
1108 | .xword 0xbf2fb03d78021887 | |
1109 | .xword 0x9aa1747bfee8805f | |
1110 | .xword 0x0dc71c42f849a4cc | |
1111 | .xword 0x5c4c6eae838f382f | |
1112 | .xword 0x75d45b99eb8d6b5c | |
1113 | .xword 0x07df00dd2b7112fd | |
1114 | .xword 0xd630828b56b06234 | |
1115 | .xword 0xfb3194fde8a7d689 | |
1116 | .xword 0x26a8dec0c35292dc | |
1117 | .xword 0x9d797d1db6905f4a | |
1118 | .xword 0x4d64f06fb82970ab | |
1119 | .xword 0xa582a4e68559b67b | |
1120 | .xword 0x29c0d8cbe5fc5932 | |
1121 | .xword 0xb0d6bb9c420c009c | |
1122 | .xword 0x58f81a9051a9e562 | |
1123 | .xword 0x70aaab4666ace09b | |
1124 | .xword 0x94a74ef77c5d9534 | |
1125 | .xword 0x6cc29b6149178d0b | |
1126 | .xword 0x8a238fa3ecae3ae3 | |
1127 | .xword 0x00f352f24f95fe56 | |
1128 | .xword 0x880eef65944b9a49 | |
1129 | .xword 0x8314f85bab2351fa | |
1130 | .xword 0x56c1760885eb7282 | |
1131 | .xword 0x8affc23a7901f10b | |
1132 | .xword 0xe87f07fbb6324ab1 | |
1133 | .xword 0x3a559d7a962621f1 | |
1134 | .xword 0xbf32fafbb0942e01 | |
1135 | .xword 0x7e3734aec1ac4fd0 | |
1136 | .xword 0xfd8f3c20c1d841cb | |
1137 | .xword 0x1af96f49a0026b7a | |
1138 | .xword 0xbc17dc18fa9a16c9 | |
1139 | .xword 0x13a515ef19b35969 | |
1140 | .xword 0x050c2981958b703b | |
1141 | .xword 0x49764cf52113d5f8 | |
1142 | .xword 0xbb8581124cfb8725 | |
1143 | .xword 0xc5c6e3932c6e2fad | |
1144 | .xword 0x86095317841ce0d2 | |
1145 | .xword 0xa52031e6ef7a16bb | |
1146 | .xword 0xc0c9f1060ad54d42 | |
1147 | .xword 0x46a64d67f62f2c4b | |
1148 | .xword 0x149925a18d229c5a | |
1149 | .xword 0x5bdb08584e3468d4 | |
1150 | .xword 0xd7ef5dd9b519bf5f | |
1151 | .xword 0x04c718dbc4e4f814 | |
1152 | .xword 0xada343a781936fa1 | |
1153 | .xword 0xb6d47839377a1b3b | |
1154 | .xword 0x646a948bac424f57 | |
1155 | .xword 0x071dba613f77a983 | |
1156 | .xword 0x4e4618401d773b5f | |
1157 | .xword 0x4740d9bdafa0a347 | |
1158 | .xword 0x63d8a4e3c842d541 | |
1159 | .xword 0xb10a4fcbe57b4800 | |
1160 | .xword 0x2db2c04597fe5f74 | |
1161 | .xword 0x57b54bee13078666 | |
1162 | .xword 0x7d493d45e50ce006 | |
1163 | .xword 0xec1a7f4fb4f8db4b | |
1164 | .xword 0x7539c04d266e52db | |
1165 | .xword 0xc54dcb5aa04db489 | |
1166 | .xword 0x62a38cbf5516759a | |
1167 | .xword 0x03cd69201d7d7260 | |
1168 | .xword 0x99764f6a85d67984 | |
1169 | .xword 0x3841196ae300d6b3 | |
1170 | .xword 0xb86ae9d7986fa4f8 | |
1171 | .xword 0x05bd2562cc3a9d30 | |
1172 | .xword 0x203d4c62497473e6 | |
1173 | .xword 0x8c51547c2fb094b8 | |
1174 | .xword 0x065f71ae8f5fba18 | |
1175 | .xword 0x8fcc354cb29f572a | |
1176 | .xword 0xedc3164124b83933 | |
1177 | .xword 0x7472dce2c5d4f566 | |
1178 | .xword 0xa7f4800f9c07ccef | |
1179 | .xword 0xd81ea78262f10d26 | |
1180 | .xword 0x5ad125ce6f12094c | |
1181 | .xword 0xd28bcf37c823e28c | |
1182 | .xword 0xbd850077c1a4d858 | |
1183 | .xword 0xdcb5c8e232cbe2c9 | |
1184 | .xword 0x5252ac1f690fcb06 | |
1185 | .xword 0xb357a30ba514b950 | |
1186 | .xword 0x78139b4a0cb50512 | |
1187 | .xword 0xaf1cced7abbfa42a | |
1188 | .xword 0x267fb7e2a16b9343 | |
1189 | .xword 0xb54978ccfa179e1e | |
1190 | .xword 0x34e119dfadc78d6f | |
1191 | .xword 0x728893485abf0346 | |
1192 | .xword 0x38737497f24736e1 | |
1193 | .xword 0x3a22b2900e5e30e0 | |
1194 | .xword 0xc7daa304d9cd8023 | |
1195 | .xword 0xe907043a70bf5ffb | |
1196 | .xword 0xedb12ca8aa112006 | |
1197 | .xword 0x7a278be7fb88458e | |
1198 | .xword 0xc3075a60c7dad24e | |
1199 | .xword 0xc15e378a594a46c6 | |
1200 | .xword 0x33ff339e5d97574e | |
1201 | .xword 0x11b378756110179f | |
1202 | .xword 0xd484455105fe3454 | |
1203 | .xword 0x1c2890b4e8bff825 | |
1204 | .xword 0x2ac839b7673a5d52 | |
1205 | .xword 0x000460171e3649a2 | |
1206 | .xword 0x4e909a981176afc6 | |
1207 | .xword 0x0fb4195d0ff120b6 | |
1208 | .xword 0xdd6221b695ae880e | |
1209 | .xword 0xb084e9959bd35840 | |
1210 | .xword 0x0a92f474face4fa4 | |
1211 | .xword 0xaa58d6569c8dab9f | |
1212 | .xword 0x1f3507e6c1683f27 | |
1213 | .xword 0xe5e9a6d62e77da93 | |
1214 | .xword 0xa58df9f6212c9951 | |
1215 | .xword 0x26dbc1f1be12f308 | |
1216 | .xword 0x8d16c68d44a06d3a | |
1217 | .xword 0xd2d9844f5775f6c2 | |
1218 | .xword 0x73b8f401dd872c61 | |
1219 | .xword 0xaba796f47c24bbc3 | |
1220 | .xword 0x642ba9f61e0c89fc | |
1221 | .xword 0xd5deffe3d70df39b | |
1222 | .xword 0x2dc29c45858b59df | |
1223 | .xword 0x8af9862600d14638 | |
1224 | .xword 0xe520f8c7655adf38 | |
1225 | .xword 0xfd53075907dce91c | |
1226 | .xword 0x3a8e8db64e28c1cc | |
1227 | .xword 0x79c4e8047dca3962 | |
1228 | .xword 0xe29767aba1564f17 | |
1229 | .xword 0x22f5ff0138769edb | |
1230 | .xword 0x806f8482c2d086e4 | |
1231 | .xword 0x209b22c4d7bcf835 | |
1232 | .xword 0xc456df00fc434a9a | |
1233 | .xword 0x0044064e7020b17a | |
1234 | .xword 0x9ceefd2c72dbea57 | |
1235 | .xword 0xa6e977ec16f530da | |
1236 | .xword 0x021e9a53d55225e7 | |
1237 | .xword 0x2ccf2c4d395b5933 | |
1238 | .xword 0x95a1d83f8131c325 | |
1239 | .xword 0x4e17b59fd2b259eb | |
1240 | .xword 0xe25034ca876e7126 | |
1241 | .xword 0xfadf8429f8f31687 | |
1242 | .xword 0x59d556bc9ae633cd | |
1243 | .xword 0xcee0793e2bbeff86 | |
1244 | .xword 0x96186143d536bfb6 | |
1245 | .xword 0x205f973daa1b2f8d | |
1246 | .xword 0x5b91cba09a923fa4 | |
1247 | .xword 0x3b1b74092976ee3e | |
1248 | .xword 0x519e0f311407c724 | |
1249 | .xword 0x4566103f21e5e81d | |
1250 | .xword 0xc2f33141848c7eeb | |
1251 | .xword 0xaf76220dcca64b85 | |
1252 | .xword 0xf88c9b44f3c5e106 | |
1253 | .xword 0x26baac23b2271fa3 | |
1254 | .xword 0x164fd599eec8cbe8 | |
1255 | .xword 0xd56a1676c292a299 | |
1256 | .xword 0xd709acbdee0f3e51 | |
1257 | .xword 0xebf830b2e66f7331 | |
1258 | .xword 0x47510b863638d1b9 | |
1259 | .xword 0xed455aa59fd493f1 | |
1260 | .xword 0xce0582afcf24abc4 | |
1261 | .xword 0xa69c537d3689d911 | |
1262 | .xword 0xb7333f03f16e9b32 | |
1263 | .xword 0xda561ef97f72bbae | |
1264 | .xword 0x651da7685f31a068 | |
1265 | .xword 0x2483da1b2f97053f | |
1266 | .xword 0xe6fd6383c163fabf | |
1267 | .xword 0x7cbee514087e9c23 | |
1268 | .xword 0x10e68e9c00a598c0 | |
1269 | .xword 0x83f38719c844de0a | |
1270 | .xword 0x9fb2035ae82cb4f2 | |
1271 | .xword 0x75a05292c2fb4917 | |
1272 | .xword 0x88478679853c31aa | |
1273 | .xword 0xf540eb82fe19fdc3 | |
1274 | .xword 0x47283635de7c9ef3 | |
1275 | .xword 0x23bea98d8d606fdb | |
1276 | .xword 0xdaad7c3d5510c050 | |
1277 | .xword 0x9ec04f546c98da46 | |
1278 | .xword 0xf88f84593ad68939 | |
1279 | .xword 0x8b27fa9b40d60217 | |
1280 | .xword 0xef001dd08b4e49ac | |
1281 | .xword 0x6aee387f70095990 | |
1282 | .xword 0x1ebb528139be8ce1 | |
1283 | .xword 0xc967f7492c9e3376 | |
1284 | .xword 0xff6fba6dde7b8e27 | |
1285 | .xword 0x1c10edaa6b3d2ae8 | |
1286 | .xword 0x05726b445a672884 | |
1287 | .xword 0xdd0af47994088ddb | |
1288 | .xword 0x4ca5bb25d4b6d5ce | |
1289 | .xword 0xae3edc5f61a7bd6d | |
1290 | .xword 0xcf079c3f1f372284 | |
1291 | .xword 0xe4907fefd4f148d0 | |
1292 | .xword 0x11795d8842c8df2b | |
1293 | .xword 0x26505f342fbf82ef | |
1294 | .xword 0x3c3d7b1b586a1d3e | |
1295 | .xword 0x73bf044a50af0c2e | |
1296 | .xword 0x32ee60c10b9f2a59 | |
1297 | .xword 0x3265cacfa338746a | |
1298 | .xword 0xcbb79fac5a189bfe | |
1299 | .xword 0x6cc8e54ba06746bc | |
1300 | .xword 0x7fc979da4b7d5164 | |
1301 | .xword 0xe173b59a84116f39 | |
1302 | .xword 0xcd9b12088a35238b | |
1303 | .xword 0x5c6c08eb2d0c3493 | |
1304 | .xword 0x2e75f2f712246580 | |
1305 | .xword 0x826f92c3e61aaaa5 | |
1306 | .xword 0x19efdec6b20f2113 | |
1307 | .xword 0x4667e285c9e78445 | |
1308 | .xword 0x8b82d3361416b6b9 | |
1309 | .xword 0x3b30763daa96cffc | |
1310 | .xword 0xf3dc9073d5932f17 | |
1311 | .xword 0xe8912ffc0883cb98 | |
1312 | .xword 0x5aceda14ee3bcc21 | |
1313 | .xword 0xa6db58bbbb7108f2 | |
1314 | .xword 0xbec416d1b92036d8 | |
1315 | .xword 0x19625bb2196a2aae | |
1316 | .xword 0xb3f7739c6a0e2eae | |
1317 | .xword 0x14010cc6b381e958 | |
1318 | .xword 0x027ed24be785d5d0 | |
1319 | .xword 0xcacbc1c7797bbb0d | |
1320 | .xword 0x6c1d6028a383a6a6 | |
1321 | .xword 0xeda16f22a4bad790 | |
1322 | .xword 0x9f2b6fa084b006da | |
1323 | .xword 0xda1ed6da4fb7a9f6 | |
1324 | .xword 0xbbc297733e5615a8 | |
1325 | .xword 0x5d1ca1f1eca46df8 | |
1326 | .xword 0x6f2b133c75dfe819 | |
1327 | .xword 0x92ccaab83afc0e87 | |
1328 | .xword 0xc4ab112558229666 | |
1329 | .xword 0xaca9c0aa32ac0e82 | |
1330 | .xword 0x191cae4185756eeb | |
1331 | .xword 0xc3ea77b4a90ad64d | |
1332 | .xword 0x7ccf76bbb7a29132 | |
1333 | .xword 0x6c56654b1b685353 | |
1334 | .xword 0x0eab4a22a029e769 | |
1335 | .xword 0x5dabf35617b7dd15 | |
1336 | .xword 0x6107b99d2e6bba6c | |
1337 | ||
1338 | ||
1339 | SECTION .MAIN | |
1340 | .text | |
1341 | nop | |
1342 | nop | |
1343 | nop | |
1344 | ta T_CHANGE_HPRIV | |
1345 | set 0x80000, %r2 | |
1346 | wrhpr %g2, %g0, %htba | |
1347 | ta T_GOOD_TRAP | |
1348 | nop | |
1349 | nop | |
1350 | nop | |
1351 | .data | |
1352 | .xword 0x0 | |
1353 | ||
1354 | .global wdog_2_ext | |
1355 | ||
1356 | .global wdog_2_ext | |
1357 | ||
1358 | SECTION .HTRAPS | |
1359 | .text | |
1360 | htrap_5_ext: | |
1361 | rd %pc, %g2 | |
1362 | inc %g3 | |
1363 | add %g2, htrap_5_ext_done-htrap_5_ext, %g2 | |
1364 | rdpr %tl, %g3 | |
1365 | rdpr %tstate, %g4 | |
1366 | rdhpr %htstate, %g5 | |
1367 | or %g5, 0x4, %g5 | |
1368 | inc %g3 | |
1369 | wrpr %g3, %tl | |
1370 | wrpr %g2, %tpc | |
1371 | add %g2, 4, %g2 | |
1372 | wrpr %g2, %tnpc | |
1373 | wrpr %g4, %tstate | |
1374 | wrhpr %g5, %htstate | |
1375 | retry | |
1376 | htrap_5_ext_done: | |
1377 | done | |
1378 | ||
1379 | wdog_2_ext: | |
1380 | rdpr %pstate, %g1 | |
1381 | wrpr %g1, 0x1000, %pstate | |
1382 | mov 0x1f, %g1 | |
1383 | stxa %g1, [%g0] ASI_LSU_CTL_REG | |
1384 | stxa %g0, [%g0] ASI_ERROR_INJECT | |
1385 | ! If TT != 2, then goto trap handler | |
1386 | rdpr %tt, %g1 | |
1387 | cmp %g1, 0x2 | |
1388 | bne wdog_2_goto_handler | |
1389 | nop | |
1390 | ! else done | |
1391 | done | |
1392 | wdog_2_goto_handler: | |
1393 | rdhpr %htba, %g2 | |
1394 | sllx %g1, 5, %g1 | |
1395 | add %g1, %g2, %g2 | |
1396 | jmp %g2 | |
1397 | nop | |
1398 | ||
1399 | ! Red mode other reset handler | |
1400 | ! Get htba, and tt and make trap address | |
1401 | ! Jump to trap handler .. | |
1402 | ||
1403 | SECTION .RED_SEC | |
1404 | .text | |
1405 | red_other_ext: | |
1406 | ! IF TL=6, shift stack by one .. | |
1407 | rdpr %tl, %g1 | |
1408 | cmp %g1, 6 | |
1409 | be start_tsa_shift | |
1410 | nop | |
1411 | ||
1412 | continue_red_other: | |
1413 | mov 0x1f, %g1 | |
1414 | stxa %g1, [%g0] ASI_LSU_CTL_REG | |
1415 | stxa %g0, [%g0] ASI_ERROR_INJECT | |
1416 | ||
1417 | rdpr %tt, %g1 | |
1418 | sllx %g1, 5, %g1 | |
1419 | rdhpr %htba, %g2 | |
1420 | add %g1, %g2, %g2 | |
1421 | rdhpr %hpstate, %g1 | |
1422 | jmp %g2 | |
1423 | wrhpr %g1, 0x20, %hpstate | |
1424 | nop | |
1425 | ||
1426 | wdog_red_ext: | |
1427 | ! Shift stack down by 1 ... | |
1428 | rdpr %tl, %g1 | |
1429 | start_tsa_shift: | |
1430 | mov 0x2, %g2 | |
1431 | ||
1432 | tsa_shift: | |
1433 | wrpr %g2, %tl | |
1434 | rdpr %tt, %g3 | |
1435 | rdpr %tpc, %g4 | |
1436 | rdpr %tnpc, %g5 | |
1437 | rdpr %tstate, %g6 | |
1438 | rdhpr %htstate, %g7 | |
1439 | dec %g2 | |
1440 | wrpr %g2, %tl | |
1441 | wrpr %g3, %tt | |
1442 | wrpr %g4, %tpc | |
1443 | wrpr %g5, %tnpc | |
1444 | wrpr %g6, %tstate | |
1445 | wrhpr %g7, %htstate | |
1446 | add %g2, 2, %g2 | |
1447 | cmp %g2, %g1 | |
1448 | ble tsa_shift | |
1449 | nop | |
1450 | tsa_shift_done: | |
1451 | dec %g1 | |
1452 | wrpr %g1, %tl | |
1453 | ||
1454 | ! If TT != 2, then goto trap handler | |
1455 | rdpr %tt, %g1 | |
1456 | ||
1457 | cmp %g1, 0x2 | |
1458 | bne continue_red_other | |
1459 | nop | |
1460 | ! else done | |
1461 | mov 0x1f, %g1 | |
1462 | stxa %g1, [%g0] ASI_LSU_CTL_REG | |
1463 | stxa %g0, [%g0] ASI_ERROR_INJECT | |
1464 | done | |
1465 | ||
1466 | ||
1467 | ||
1468 | SECTION .MyHTRAPS_0 TEXT_VA = 0x0000000000380000, DATA_VA = 0x000000000038c000 | |
1469 | attr_text { | |
1470 | Name = .MyHTRAPS_0, | |
1471 | hypervisor | |
1472 | } | |
1473 | ||
1474 | ||
1475 | attr_data { | |
1476 | Name = .MyHTRAPS_0, | |
1477 | hypervisor | |
1478 | } | |
1479 | ||
1480 | #include "htraps.s" | |
1481 | #include "tlu_htraps_ext.s" | |
1482 | ||
1483 | ||
1484 | ||
1485 | SECTION .MyHTRAPS_1 TEXT_VA = 0x0000000000390000, DATA_VA = 0x000000000039c000 | |
1486 | attr_text { | |
1487 | Name = .MyHTRAPS_1, | |
1488 | hypervisor | |
1489 | } | |
1490 | ||
1491 | ||
1492 | attr_data { | |
1493 | Name = .MyHTRAPS_1, | |
1494 | hypervisor | |
1495 | } | |
1496 | ||
1497 | #include "htraps.s" | |
1498 | #include "tlu_htraps_ext.s" | |
1499 | ||
1500 | ||
1501 | ||
1502 | SECTION .MyHTRAPS_2 TEXT_VA = 0x00000000003a0000, DATA_VA = 0x00000000003ac000 | |
1503 | attr_text { | |
1504 | Name = .MyHTRAPS_2, | |
1505 | hypervisor | |
1506 | } | |
1507 | ||
1508 | ||
1509 | attr_data { | |
1510 | Name = .MyHTRAPS_2, | |
1511 | hypervisor | |
1512 | } | |
1513 | ||
1514 | #include "htraps.s" | |
1515 | #include "tlu_htraps_ext.s" | |
1516 | ||
1517 | ||
1518 | ||
1519 | SECTION .MyHTRAPS_3 TEXT_VA = 0x00000000003b0000, DATA_VA = 0x00000000003bc000 | |
1520 | attr_text { | |
1521 | Name = .MyHTRAPS_3, | |
1522 | hypervisor | |
1523 | } | |
1524 | ||
1525 | ||
1526 | attr_data { | |
1527 | Name = .MyHTRAPS_3, | |
1528 | hypervisor | |
1529 | } | |
1530 | ||
1531 | #include "htraps.s" | |
1532 | #include "tlu_htraps_ext.s" | |
1533 | ||
1534 | ||
1535 | ||
1536 | ||
1537 | ||
1538 | SECTION .MyTRAPS_0 TEXT_VA = 0x00000000003c0000, DATA_VA = 0x00000000003cc000 | |
1539 | attr_text { | |
1540 | Name = .MyTRAPS_0, | |
1541 | RA = 0x00000000003c0000, | |
1542 | PA = ra2pa(0x00000000003c0000,0), | |
1543 | part_0_ctx_zero_tsb_config_0, | |
1544 | TTE_G = 1, | |
1545 | TTE_Context = 0, | |
1546 | TTE_V = 1, | |
1547 | TTE_Size = 0, | |
1548 | TTE_NFO = 0, | |
1549 | TTE_IE = 0, | |
1550 | TTE_Soft2 = 0, | |
1551 | TTE_Diag = 0, | |
1552 | TTE_Soft = 0, | |
1553 | TTE_L = 0, | |
1554 | TTE_CP = 1, | |
1555 | TTE_CV = 0, | |
1556 | TTE_E = 0, | |
1557 | TTE_P = 1, | |
1558 | TTE_W = 1, | |
1559 | TTE_X = 1 | |
1560 | } | |
1561 | ||
1562 | ||
1563 | attr_data { | |
1564 | Name = .MyTRAPS_0, | |
1565 | RA = 0x00000000003cc000, | |
1566 | PA = ra2pa(0x00000000003cc000,0), | |
1567 | part_0_ctx_zero_tsb_config_0, | |
1568 | TTE_G = 1, | |
1569 | TTE_Context = 0, | |
1570 | TTE_V = 1, | |
1571 | TTE_Size = 0, | |
1572 | TTE_NFO = 0, | |
1573 | TTE_IE = 0, | |
1574 | TTE_Soft2 = 0, | |
1575 | TTE_Diag = 0, | |
1576 | TTE_Soft = 0, | |
1577 | TTE_L = 0, | |
1578 | TTE_CP = 1, | |
1579 | TTE_CV = 0, | |
1580 | TTE_E = 0, | |
1581 | TTE_P = 1, | |
1582 | TTE_W = 1 | |
1583 | } | |
1584 | ||
1585 | attr_text { | |
1586 | Name = .MyTRAPS_0 | |
1587 | hypervisor | |
1588 | } | |
1589 | attr_data { | |
1590 | Name = .MyTRAPS_0 | |
1591 | hypervisor | |
1592 | } | |
1593 | ||
1594 | #include "traps.s" | |
1595 | ||
1596 | ||
1597 | ||
1598 | SECTION .MyTRAPS_1 TEXT_VA = 0x00000000003d0000, DATA_VA = 0x00000000003dc000 | |
1599 | attr_text { | |
1600 | Name = .MyTRAPS_1, | |
1601 | RA = 0x00000000003d0000, | |
1602 | PA = ra2pa(0x00000000003d0000,0), | |
1603 | part_0_ctx_zero_tsb_config_0, | |
1604 | TTE_G = 1, | |
1605 | TTE_Context = 0, | |
1606 | TTE_V = 1, | |
1607 | TTE_Size = 0, | |
1608 | TTE_NFO = 0, | |
1609 | TTE_IE = 0, | |
1610 | TTE_Soft2 = 0, | |
1611 | TTE_Diag = 0, | |
1612 | TTE_Soft = 0, | |
1613 | TTE_L = 0, | |
1614 | TTE_CP = 1, | |
1615 | TTE_CV = 0, | |
1616 | TTE_E = 0, | |
1617 | TTE_P = 1, | |
1618 | TTE_W = 1, | |
1619 | TTE_X = 1 | |
1620 | } | |
1621 | ||
1622 | ||
1623 | attr_data { | |
1624 | Name = .MyTRAPS_1, | |
1625 | RA = 0x00000000003dc000, | |
1626 | PA = ra2pa(0x00000000003dc000,0), | |
1627 | part_0_ctx_zero_tsb_config_0, | |
1628 | TTE_G = 1, | |
1629 | TTE_Context = 0, | |
1630 | TTE_V = 1, | |
1631 | TTE_Size = 0, | |
1632 | TTE_NFO = 0, | |
1633 | TTE_IE = 0, | |
1634 | TTE_Soft2 = 0, | |
1635 | TTE_Diag = 0, | |
1636 | TTE_Soft = 0, | |
1637 | TTE_L = 0, | |
1638 | TTE_CP = 1, | |
1639 | TTE_CV = 0, | |
1640 | TTE_E = 0, | |
1641 | TTE_P = 1, | |
1642 | TTE_W = 1 | |
1643 | } | |
1644 | ||
1645 | attr_text { | |
1646 | Name = .MyTRAPS_1 | |
1647 | hypervisor | |
1648 | } | |
1649 | attr_data { | |
1650 | Name = .MyTRAPS_1 | |
1651 | hypervisor | |
1652 | } | |
1653 | ||
1654 | #include "traps.s" | |
1655 | ||
1656 | ||
1657 | ||
1658 | SECTION .MyTRAPS_2 TEXT_VA = 0x00000000003e0000, DATA_VA = 0x00000000003ec000 | |
1659 | attr_text { | |
1660 | Name = .MyTRAPS_2, | |
1661 | RA = 0x00000000003e0000, | |
1662 | PA = ra2pa(0x00000000003e0000,0), | |
1663 | part_0_ctx_zero_tsb_config_0, | |
1664 | TTE_G = 1, | |
1665 | TTE_Context = 0, | |
1666 | TTE_V = 1, | |
1667 | TTE_Size = 0, | |
1668 | TTE_NFO = 0, | |
1669 | TTE_IE = 0, | |
1670 | TTE_Soft2 = 0, | |
1671 | TTE_Diag = 0, | |
1672 | TTE_Soft = 0, | |
1673 | TTE_L = 0, | |
1674 | TTE_CP = 1, | |
1675 | TTE_CV = 0, | |
1676 | TTE_E = 0, | |
1677 | TTE_P = 1, | |
1678 | TTE_W = 1, | |
1679 | TTE_X = 1 | |
1680 | } | |
1681 | ||
1682 | ||
1683 | attr_data { | |
1684 | Name = .MyTRAPS_2, | |
1685 | RA = 0x00000000003ec000, | |
1686 | PA = ra2pa(0x00000000003ec000,0), | |
1687 | part_0_ctx_zero_tsb_config_0, | |
1688 | TTE_G = 1, | |
1689 | TTE_Context = 0, | |
1690 | TTE_V = 1, | |
1691 | TTE_Size = 0, | |
1692 | TTE_NFO = 0, | |
1693 | TTE_IE = 0, | |
1694 | TTE_Soft2 = 0, | |
1695 | TTE_Diag = 0, | |
1696 | TTE_Soft = 0, | |
1697 | TTE_L = 0, | |
1698 | TTE_CP = 1, | |
1699 | TTE_CV = 0, | |
1700 | TTE_E = 0, | |
1701 | TTE_P = 1, | |
1702 | TTE_W = 1 | |
1703 | } | |
1704 | ||
1705 | attr_text { | |
1706 | Name = .MyTRAPS_2 | |
1707 | hypervisor | |
1708 | } | |
1709 | attr_data { | |
1710 | Name = .MyTRAPS_2 | |
1711 | hypervisor | |
1712 | } | |
1713 | ||
1714 | #include "traps.s" | |
1715 | ||
1716 | ||
1717 | ||
1718 | SECTION .MyTRAPS_3 TEXT_VA = 0x00000000003f0000, DATA_VA = 0x00000000003fc000 | |
1719 | attr_text { | |
1720 | Name = .MyTRAPS_3, | |
1721 | RA = 0x00000000003f0000, | |
1722 | PA = ra2pa(0x00000000003f0000,0), | |
1723 | part_0_ctx_zero_tsb_config_0, | |
1724 | TTE_G = 1, | |
1725 | TTE_Context = 0, | |
1726 | TTE_V = 1, | |
1727 | TTE_Size = 0, | |
1728 | TTE_NFO = 0, | |
1729 | TTE_IE = 0, | |
1730 | TTE_Soft2 = 0, | |
1731 | TTE_Diag = 0, | |
1732 | TTE_Soft = 0, | |
1733 | TTE_L = 0, | |
1734 | TTE_CP = 1, | |
1735 | TTE_CV = 0, | |
1736 | TTE_E = 0, | |
1737 | TTE_P = 1, | |
1738 | TTE_W = 1, | |
1739 | TTE_X = 1 | |
1740 | } | |
1741 | ||
1742 | ||
1743 | attr_data { | |
1744 | Name = .MyTRAPS_3, | |
1745 | RA = 0x00000000003fc000, | |
1746 | PA = ra2pa(0x00000000003fc000,0), | |
1747 | part_0_ctx_zero_tsb_config_0, | |
1748 | TTE_G = 1, | |
1749 | TTE_Context = 0, | |
1750 | TTE_V = 1, | |
1751 | TTE_Size = 0, | |
1752 | TTE_NFO = 0, | |
1753 | TTE_IE = 0, | |
1754 | TTE_Soft2 = 0, | |
1755 | TTE_Diag = 0, | |
1756 | TTE_Soft = 0, | |
1757 | TTE_L = 0, | |
1758 | TTE_CP = 1, | |
1759 | TTE_CV = 0, | |
1760 | TTE_E = 0, | |
1761 | TTE_P = 1, | |
1762 | TTE_W = 1 | |
1763 | } | |
1764 | ||
1765 | attr_text { | |
1766 | Name = .MyTRAPS_3 | |
1767 | hypervisor | |
1768 | } | |
1769 | attr_data { | |
1770 | Name = .MyTRAPS_3 | |
1771 | hypervisor | |
1772 | } | |
1773 | ||
1774 | #include "traps.s" | |
1775 | ||
1776 | ||
1777 | ||
1778 | #if 0 | |
1779 | !!# /* | |
1780 | !!# output of /import/bw/tools/local/indra-release/indra,1.4.11/bin/ijpp (indrajal preprocessor) - Tue May 18 16:03:41 2004 | |
1781 | !!# */ | |
1782 | !!# | |
1783 | !!# %%section c_declarations | |
1784 | !!# | |
1785 | !!# int label = 0; | |
1786 | !!# | |
1787 | !!# #define MyHTRAPS 0 | |
1788 | !!# #define MyTRAPS 1 | |
1789 | !!# #define MAIN 2 | |
1790 | !!# #define HTRAPS 3 | |
1791 | !!# #define RED_SEC 4 | |
1792 | !!# | |
1793 | !!# %% | |
1794 | !!# %%section control | |
1795 | !!# | |
1796 | !!# %% | |
1797 | !!# %%section init | |
1798 | !!# { | |
1799 | !!# | |
1800 | !!# | |
1801 | !!# IJ_bind_thread_group("diag.j", 51, th0, 0x01); | |
1802 | !!# | |
1803 | !!# // Random 64 bits // | |
1804 | !!# IJ_set_rvar("diag.j", 54, Rv_rand_64,"64'hrrrrrrrr_rrrrrrrr"); | |
1805 | !!# | |
1806 | !!# IJ_set_rvar("diag.j", 57, Rv_pdist_reg,"5'brrrr0"); | |
1807 | !!# | |
1808 | !!# // TBA/HTBA values | |
1809 | !!# | |
1810 | !!# IJ_set_rvar("diag.j", 61, Rv_tba, "6'b1111kk, 16'{0}"); | |
1811 | !!# IJ_set_rvar("diag.j", 62, Rv_htba, "6'b1110kk, 16'{0}"); | |
1812 | !!# | |
1813 | !!# // LSU cntl reg .. | |
1814 | !!# IJ_set_rvar("diag.j", 65, Rv_lsucntl, "5'brrrr1"); | |
1815 | !!# | |
1816 | !!# // Illegal combos | |
1817 | !!# IJ_set_rvar("diag.j", 68, Rv_illtrap, "2'b1r,5'brrrr,6'b1r1rrr,19'hrrrrr"); | |
1818 | !!# | |
1819 | !!# // Register usage - use 0-27 // | |
1820 | !!# // R31 is memory pointer | |
1821 | !!# // R30 is trap number register | |
1822 | !!# // | |
1823 | !!# | |
1824 | !!# IJ_set_ropr_fld("diag.j", 75, ijdefault, Ft_Rs1, "{0..13,16..27}"); | |
1825 | !!# IJ_set_ropr_fld("diag.j", 76, ijdefault, Ft_Rs2, "{0..13,16..27}"); | |
1826 | !!# IJ_set_ropr_fld("diag.j", 77, ijdefault, Ft_Rd, "{0..13,16..27}"); | |
1827 | !!# | |
1828 | !!# // Load/Store pointer = r31 | |
1829 | !!# IJ_set_ropr_fld("diag.j", 80, Ro_ldst_ptr, Ft_Rs1, "{31}"); | |
1830 | !!# | |
1831 | !!# // ASI register values | |
1832 | !!# IJ_set_ropr_fld("diag.j", 83, Ro_wrasi_i, Ft_Rs1, "{0}"); | |
1833 | !!# IJ_set_ropr_fld("diag.j", 84, Ro_wrasi_i, Ft_Simm13, "{0x4, 0x20, 0x10, 0x14, 0x16, 0x1c, 0x4f, 0x58, 0x55, 0x63, 0x80, 0x88, 0x89}"); | |
1834 | !!# | |
1835 | !!# // General Ldst ASIs to use .. 50% should be illegal .. | |
1836 | !!# IJ_set_ropr_fld("diag.j", 87, Ro_nontrap_ldasi, Ft_Imm_Asi, "{0x12,0x20, 0x14, 0x16, 0x1c, 0x4f, 0x63, 0x55, 0x58, 0x80, 0x88}"); | |
1837 | !!# IJ_set_ropr_fld("diag.j", 88, Ro_nontrap_ldasi, Ft_Rs1, "{31}"); | |
1838 | !!# IJ_set_ropr_fld("diag.j", 89, Ro_nontrap_ldasi, Ft_Rs2, "{0}"); | |
1839 | !!# IJ_set_ropr_fld("diag.j", 90, Ro_nontrap_ldasi, Ft_Simm13, "{0x0}, 6'brr0000"); | |
1840 | !!# | |
1841 | !!# IJ_set_ropr_fld("diag.j", 92, Ro_nontrap_ldasi_z, Ft_Imm_Asi, "{0x45, 0x53..0x64}"); | |
1842 | !!# IJ_set_ropr_fld("diag.j", 93, Ro_nontrap_ldasi_z, Ft_Rs1, "{0}"); | |
1843 | !!# IJ_set_ropr_fld("diag.j", 94, Ro_nontrap_ldasi_z, Ft_Rs2, "{0}"); | |
1844 | !!# IJ_set_ropr_fld("diag.j", 95, Ro_nontrap_ldasi_z, Ft_Simm13, "{0x0}, 6'brr0000"); | |
1845 | !!# | |
1846 | !!# // General Ldst alignment to use .. 50% should be illegal .. | |
1847 | !!# IJ_set_ropr_fld("diag.j", 98, Ro_nontrap_ld, Fm_align_Simm13, "{0x0..0x6:5,0x7:1}"); | |
1848 | !!# IJ_set_ropr_fld("diag.j", 99, Ro_nontrap_ld, Ft_Rs1, "{31}"); | |
1849 | !!# IJ_set_ropr_fld("diag.j", 100, Ro_nontrap_ld, Ft_Rs2, "{0}"); | |
1850 | !!# | |
1851 | !!# // Trap ASI operands | |
1852 | !!# IJ_set_ropr_fld("diag.j", 103, Ro_traps_asi, Ft_Imm_Asi, "{0x25, 0x72..0x74}"); | |
1853 | !!# IJ_set_ropr_fld("diag.j", 104, Ro_traps_asi, Ft_Rs1, "{0}"); | |
1854 | !!# IJ_set_ropr_fld("diag.j", 105, Ro_traps_asi, Ft_Rs2, "{0}"); | |
1855 | !!# IJ_set_ropr_fld("diag.j", 106, Ro_traps_asi, Ft_Simm13, "{0x25, 0x72..0x74}"); | |
1856 | !!# | |
1857 | !!# // Trap #s to use | |
1858 | !!# //IJ_set_ropr_fld(Ro_traps_i, Ft_Sw_Trap, "{0x30..0x35, 0xb0..0xb5}"); | |
1859 | !!# IJ_set_ropr_fld("diag.j", 110, Ro_traps_i, Ft_Sw_Trap, "{0x32..0x35, 0xb2..0xb5}"); | |
1860 | !!# IJ_set_ropr_fld("diag.j", 111, Ro_traps_i, Ft_Rs1, "{0}"); | |
1861 | !!# IJ_set_ropr_fld("diag.j", 112, Ro_traps_i, Ft_Cond_f2, "{0x8:3, 0x9, 0x1}"); | |
1862 | !!# IJ_set_ropr_fld("diag.j", 113, Ro_traps_r, Ft_Rs1, "{0}"); | |
1863 | !!# IJ_set_ropr_fld("diag.j", 114, Ro_traps_r, Ft_Rs2, "{30}"); | |
1864 | !!# IJ_set_ropr_fld("diag.j", 115, Ro_traps_r, Ft_Cond_f2, "{0x8:3, 0x9, 0x1}"); | |
1865 | !!# //IJ_set_ropr_fld(Ro_traps_r, Ft_Simm13, "{0x30..0x35, 0xb0..0xb5}"); | |
1866 | !!# IJ_set_ropr_fld("diag.j", 117, Ro_traps_r, Ft_Simm13, "{0x32..0x35, 0xb2..0xb5}"); | |
1867 | !!# IJ_set_rvar("diag.j", 118, Rv_init_trap, "{0x30..0x35, 0xb0..0xb5}"); | |
1868 | !!# | |
1869 | !!# // FPRS splash | |
1870 | !!# IJ_set_ropr_fld("diag.j", 121, Ro_wrfprs, Ft_Rs1, "{0}"); | |
1871 | !!# IJ_set_ropr_fld("diag.j", 122, Ro_wrfprs, Ft_Simm13, "{0, 4}"); | |
1872 | !!# | |
1873 | !!# // Pstate splash | |
1874 | !!# IJ_set_ropr_fld("diag.j", 125, Ro_wrpstate, Ft_Rs1, "{0}"); | |
1875 | !!# IJ_set_ropr_fld("diag.j", 126, Ro_wrpstate, Ft_Simm13, "13'brrrrrrrrrrrrr"); | |
1876 | !!# | |
1877 | !!# // Hpstate splash | |
1878 | !!# IJ_set_ropr_fld("diag.j", 129, Ro_wrhpstate, Ft_Rs1, "{0}"); | |
1879 | !!# IJ_set_ropr_fld("diag.j", 130, Ro_wrhpstate, Ft_Simm13, "12'brrrrrr0rr1rr"); | |
1880 | !!# | |
1881 | !!# // TT splash | |
1882 | !!# IJ_set_ropr_fld("diag.j", 133, Ro_wrtt, Ft_Rs1, "{0}"); | |
1883 | !!# IJ_set_ropr_fld("diag.j", 134, Ro_wrtt, Ft_Simm13, "10'brrrrrrrrrr"); | |
1884 | !!# | |
1885 | !!# // GL splash | |
1886 | !!# IJ_set_ropr_fld("diag.j", 137, Ro_wrgl, Ft_Rs1, "{0}"); | |
1887 | !!# IJ_set_ropr_fld("diag.j", 138, Ro_wrgl, Ft_Simm13, "4'brrrr"); | |
1888 | !!# | |
1889 | !!# // TL splash | |
1890 | !!# IJ_set_ropr_fld("diag.j", 141, Ro_tl, Ft_Simm13, "{0..5}"); | |
1891 | !!# IJ_set_ropr_fld("diag.j", 142, Ro_tl, Ft_Rs1, "{0}"); | |
1892 | !!# | |
1893 | !!# // CWP splash | |
1894 | !!# IJ_set_ropr_fld("diag.j", 145, Ro_wrcwp, Ft_Rs1, "{0}"); | |
1895 | !!# IJ_set_ropr_fld("diag.j", 146, Ro_wrcwp, Ft_Simm13, "3'brrr"); | |
1896 | !!# | |
1897 | !!# IJ_set_ropr_fld("diag.j", 148, Ro_save_restore, Ft_Rs1, "{31}"); | |
1898 | !!# IJ_set_ropr_fld("diag.j", 149, Ro_save_restore, Ft_Rd, "{31}"); | |
1899 | !!# IJ_set_ropr_fld("diag.j", 150, Ro_save_restore, Ft_Rs2, "{0}"); | |
1900 | !!# | |
1901 | !!# IJ_set_ropr_fld("diag.j", 152, Ro_winops, Ft_Rs1, "{0}"); | |
1902 | !!# IJ_set_ropr_fld("diag.j", 153, Ro_winops, Ft_Simm13, "{0..5}"); | |
1903 | !!# | |
1904 | !!# // {H}TBA Splash | |
1905 | !!# IJ_set_ropr_fld("diag.j", 156, Ro_tba, Ft_Rs1, "{0}"); | |
1906 | !!# IJ_set_ropr_fld("diag.j", 157, Ro_tba, Ft_Rs2, "{2}"); | |
1907 | !!# | |
1908 | !!# // Dest reg is %g0 | |
1909 | !!# IJ_set_ropr_fld("diag.j", 160, Ro_rd0, Ft_Rd, "{0}"); | |
1910 | !!# | |
1911 | !!# // Weights | |
1912 | !!# IJ_set_default_rule_wt_rvar ("diag.j", 164,"{10}"); | |
1913 | !!# IJ_set_rvar("diag.j", 165, wt_high, "{90}"); | |
1914 | !!# IJ_set_rvar("diag.j", 166, wt_med, "{40}"); | |
1915 | !!# IJ_set_rvar("diag.j", 167, wt_low, "{10}"); | |
1916 | !!# | |
1917 | !!# // Initialize registers .. | |
1918 | !!# int i, j, k; | |
1919 | !!# IJ_printf ("diag.j", 171, th0,"!Initializing integer registers\n"); | |
1920 | !!# for (k=0; k<7; k++) { | |
1921 | !!# for (i = 0; i < 30; i++) { | |
1922 | !!# if (i==15) { | |
1923 | !!# IJ_printf ("diag.j", 175, th0,"\tmov %%r31, %%r15\n"); | |
1924 | !!# continue; | |
1925 | !!# } | |
1926 | !!# j=i*8; | |
1927 | !!# IJ_printf ("diag.j", 179, th0,"\tldx [%%r31+%d], %%r%d\n", j,i); | |
1928 | !!# } | |
1929 | !!# IJ_printf ("diag.j", 181, th0,"\tmov 0x%rx, %%r14\n", Rv_init_trap); | |
1930 | !!# IJ_printf ("diag.j", 182, th0,"\tmov 0x%rx, %%r30\n", Rv_init_trap); | |
1931 | !!# IJ_printf ("diag.j", 183, th0,"\tsave %%r31, %%r0, %%r31\n"); | |
1932 | !!# } | |
1933 | !!# for (k=0; k<3; k++) { | |
1934 | !!# IJ_printf ("diag.j", 186, th0,"\trestore\n"); | |
1935 | !!# } | |
1936 | !!# | |
1937 | !!# IJ_printf ("diag.j", 189, th0,"!Initializing float registers\n"); | |
1938 | !!# for (i = 0; i < 31; i=i+2) { | |
1939 | !!# j=i*8; | |
1940 | !!# IJ_printf ("diag.j", 192, th0,"\tldd [%%r31+%d], %%f%d\n", j,i); | |
1941 | !!# } | |
1942 | !!# | |
1943 | !!# IJ_printf ("diag.j", 195, th0,"\tta T_CHANGE_HPRIV \n"); | |
1944 | !!# IJ_printf ("diag.j", 196, th0,"!Initializing Tick Cmprs \n"); | |
1945 | !!# IJ_printf ("diag.j", 197, th0,"\tmov 1, %%g2\n"); | |
1946 | !!# IJ_printf ("diag.j", 198, th0,"\tsllx %%g2, 63, %%g2\n"); | |
1947 | !!# IJ_printf ("diag.j", 199, th0,"\tor %%g1, %%g2, %%g1\n"); | |
1948 | !!# IJ_printf("diag.j", 200, th0, "\twrhpr %%g1, %%g0, %%hsys_tick_cmpr\n"); | |
1949 | !!# IJ_printf("diag.j", 201, th0, "\twr %%g1, %%g0, %%tick_cmpr\n"); | |
1950 | !!# IJ_printf("diag.j", 202, th0, "\twr %%g1, %%g0, %%sys_tick_cmpr\n"); | |
1951 | !!# IJ_printf ("diag.j", 203, th0,"!Initializing Trap Stack \n"); | |
1952 | !!# for (i = 1; i <=6; i++) { | |
1953 | !!# IJ_printf ("diag.j", 205, th0,"\twrpr 0x%d, %%tl\n", i); | |
1954 | !!# IJ_printf ("diag.j", 206, th0,"\twrpr 0x1, %%tt\n"); | |
1955 | !!# IJ_printf ("diag.j", 207, th0,"\twrpr 0x1, %%tpc\n"); | |
1956 | !!# IJ_printf ("diag.j", 208, th0,"\twrpr 0x1, %%tnpc\n"); | |
1957 | !!# IJ_printf ("diag.j", 209, th0,"\twrpr 0x1, %%tstate\n"); | |
1958 | !!# IJ_printf ("diag.j", 210, th0,"\twrhpr 0x1, %%htstate\n"); | |
1959 | !!# } | |
1960 | !!# IJ_printf ("diag.j", 212, th0,"\twrpr 0x0, %%tl\n"); | |
1961 | !!# IJ_printf ("diag.j", 213, th0,"\tta T_CHANGE_NONHPRIV \n"); | |
1962 | !!# | |
1963 | !!# } | |
1964 | !!# | |
1965 | !!# %% | |
1966 | !!# %%section finish | |
1967 | !!# { | |
1968 | !!# | |
1969 | !!# | |
1970 | !!# int i; | |
1971 | !!# IJ_printf ("diag.j", 262, th0,"\n\n.global user_data_start\n.data\nuser_data_start:\n"); | |
1972 | !!# for (i = 0; i < 256; i++) { | |
1973 | !!# IJ_printf ("diag.j", 264, th0,"\t.xword\t0x%016llrx\n", Rv_rand_64); | |
1974 | !!# } | |
1975 | !!# | |
1976 | !!# for (i = 0; i < 4; i++) { | |
1977 | !!# IJ_iseg_printf ("diag.j", 268,MyHTRAPS, i, th0, "#include \"htraps.s\"\n"); | |
1978 | !!# IJ_iseg_printf ("diag.j", 269,MyHTRAPS, i, th0,"#include \"tlu_htraps_ext.s\"\n"); | |
1979 | !!# IJ_iseg_printf ("diag.j", 270,MyTRAPS, i, th0,"#include \"traps.s\"\n"); | |
1980 | !!# } | |
1981 | !!# | |
1982 | !!# } | |
1983 | !!# | |
1984 | !!# %% | |
1985 | !!# %%section map | |
1986 | !!# | |
1987 | !!# // Define some additional trap tables here .. | |
1988 | !!# | |
1989 | !!# SECTION .MyHTRAPS TEXT_VA = "42'{0}, 6'b1110jj, 16'{0}", | |
1990 | !!# DATA_VA = "42'{0}, 8'b1110jj11, 14'{0}", | |
1991 | !!# attr_text { | |
1992 | !!# Name = .MyHTRAPS, | |
1993 | !!# hypervisor | |
1994 | !!# } | |
1995 | !!# attr_data { | |
1996 | !!# Name = .MyHTRAPS, | |
1997 | !!# hypervisor | |
1998 | !!# } | |
1999 | !!# | |
2000 | !!# enumerate { | |
2001 | !!# TEXT_VA | |
2002 | !!# } | |
2003 | !!# | |
2004 | !!# SECTION .MyTRAPS TEXT_VA = "42'{0}, 6'b1111jj, 16'{0}", | |
2005 | !!# DATA_VA = "42'{0}, 8'b1111jj11, 14'{0}", | |
2006 | !!# attr_text { | |
2007 | !!# Name = .MyTRAPS, | |
2008 | !!# RA = "42'{0}, 6'b1111jj, 16'{0}", | |
2009 | !!# part_0_ctx_zero_tsb_config_0, | |
2010 | !!# TTE_G=1, TTE_Context=0, TTE_V=1, TTE_Size=0, TTE_NFO=0, TTE_IE=0, | |
2011 | !!# TTE_Soft2=0, TTE_Diag=0, TTE_Soft=0, TTE_L=0, TTE_CP=1, TTE_CV=0, | |
2012 | !!# TTE_E=0, TTE_P=1, TTE_W=1, TTE_X=1 | |
2013 | !!# } | |
2014 | !!# attr_data { | |
2015 | !!# Name = .MyTRAPS, | |
2016 | !!# RA = "42'{0}, 8'b1111jj11, 14'{0}", | |
2017 | !!# part_0_ctx_zero_tsb_config_0, | |
2018 | !!# TTE_G=1, TTE_Context=0, TTE_V=1, TTE_Size=0, TTE_NFO=0, TTE_IE=0, | |
2019 | !!# TTE_Soft2=0, TTE_Diag=0, TTE_Soft=0, TTE_L=0, TTE_CP=1, TTE_CV=0, | |
2020 | !!# TTE_E=0, TTE_P=1, TTE_W=1 | |
2021 | !!# } | |
2022 | !!# | |
2023 | !!# enumerate { | |
2024 | !!# TEXT_VA | |
2025 | !!# } | |
2026 | !!# | |
2027 | !!# | |
2028 | !!# | |
2029 | !!# | |
2030 | !!# %% | |
2031 | !!# %%section grammar | |
2032 | !!# | |
2033 | !!# | |
2034 | !!# block: inst | block inst | |
2035 | !!# { | |
2036 | !!# IJ_generate ("diag.j", 319, th0, $2); | |
2037 | !!# }; | |
2038 | !!# | |
2039 | !!# inst: trap_asr %rvar wt_med | |
2040 | !!# | trap_asi %rvar wt_med | |
2041 | !!# | tcc %rvar wt_high | |
2042 | !!# | ldst_excp %rvar wt_high | |
2043 | !!# | ldstasi_excp %rvar wt_med | |
2044 | !!# | ldstasi_excp_z %rvar wt_med | |
2045 | !!# | change_mode %rvar wt_med | |
2046 | !!# | alu %rvar wt_low | |
2047 | !!# | branches %rvar wt_high | |
2048 | !!# | wrasi %rvar wt_med | |
2049 | !!# | splash_fprs %rvar wt_low | |
2050 | !!# | splash_pstate %rvar wt_med | |
2051 | !!# | splash_hpstate %rvar wt_low | |
2052 | !!# | splash_cwp %rvar wt_med | |
2053 | !!# | splash_gl %rvar wt_med | |
2054 | !!# | splash_tt %rvar wt_med | |
2055 | !!# | stores %rvar wt_low | |
2056 | !!# | sir %rvar wt_low | |
2057 | !!# | splash_cmpr %rvar wt_low | |
2058 | !!# | splash_tba %rvar wt_med | |
2059 | !!# | splash_htba %rvar wt_low | |
2060 | !!# | splash_lsucnt %rvar wt_med | |
2061 | !!# //| demap %rvar wt_med | |
2062 | !!# | tagged %rvar wt_med | |
2063 | !!# ; | |
2064 | !!# | |
2065 | !!# dummy :tCHANGE_NONHPRIV | tCHANGE_NONPRIV | | |
2066 | !!# tWR_STICK_CMPR_REG_R | tWR_TICK_CMPR_REG_R | | |
2067 | !!# tILLTRAP | |
2068 | !!# ; | |
2069 | !!# | |
2070 | !!# sir : tSIR ; | |
2071 | !!# | |
2072 | !!# demap : tLDX_R %ropr Ro_nontrap_ld | |
2073 | !!# { | |
2074 | !!# IJ_set_rvar("diag.j", 357, Rv_demap, "{0x57, 0x5f}"); | |
2075 | !!# IJ_printf("diag.j", 358, th0, "\tmov 8, %%g3\n"); | |
2076 | !!# IJ_printf("diag.j", 359, th0, "\tstxa %%g3, [%%g0] 0x%rx\n", Rv_demap); | |
2077 | !!# } | |
2078 | !!# ; | |
2079 | !!# | |
2080 | !!# tagged: tLDUW_I %ropr Ro_nontrap_ld | |
2081 | !!# { | |
2082 | !!# IJ_printf("diag.j", 365, th0, "tagged_%d:\n", label); | |
2083 | !!# IJ_set_rvar("diag.j", 366, Rv_tof_r, "{1..26}"); | |
2084 | !!# IJ_set_rvar("diag.j", 367, Rv_tof_i, "13'b1rrrrrrrrrrrr"); | |
2085 | !!# if (label%2) { | |
2086 | !!# IJ_printf("diag.j", 369, th0, "\ttaddcctv %%r%rd, 0x%rx, %%r%rd\n", | |
2087 | !!# Rv_tof_r, Rv_tof_i, Rv_tof_r); | |
2088 | !!# } else { | |
2089 | !!# IJ_printf("diag.j", 372, th0, "\ttsubcctv %%r%rd, 0x%rx, %%r%rd\n", | |
2090 | !!# Rv_tof_r, Rv_tof_i, Rv_tof_r); | |
2091 | !!# } | |
2092 | !!# label++; | |
2093 | !!# } | |
2094 | !!# ; | |
2095 | !!# | |
2096 | !!# change_mode : | |
2097 | !!# reduce_priv_level | |
2098 | !!# | tCHANGE_HPRIV | |
2099 | !!# | tCHANGE_PRIV | |
2100 | !!# //| change_to_tl1 | |
2101 | !!# | change_to_randtl | |
2102 | !!# //| tCHANGE_TO_TL0 | |
2103 | !!# ; | |
2104 | !!# | |
2105 | !!# pt1: tFqTOd | tSDIVX_I | tWRTICK_R | tWR_STICK_REG_R | |
2106 | !!# ; | |
2107 | !!# | |
2108 | !!# reduce_priv_level: pt1 | |
2109 | !!# { | |
2110 | !!# | |
2111 | !!# IJ_set_ropr_fld("diag.j", 395, Ro_tl, Ft_Simm13, "{0..2}"); | |
2112 | !!# IJ_generate_from_token("diag.j", 396,1, th0, Ro_tl, tWRPR_TL_I, -1);; | |
2113 | !!# if (label%2) { | |
2114 | !!# IJ_generate_from_token("diag.j", 398,1, th0, ijdefault, tCHANGE_NONHPRIV, -1);; | |
2115 | !!# } else { | |
2116 | !!# IJ_generate_from_token("diag.j", 400,1, th0, ijdefault, tCHANGE_NONPRIV, -1);; | |
2117 | !!# } | |
2118 | !!# label++; | |
2119 | !!# } | |
2120 | !!# ; | |
2121 | !!# | |
2122 | !!# change_to_randtl: tWRPR_TL_I %ropr Ro_tl | |
2123 | !!# { | |
2124 | !!# IJ_printf("diag.j", 408, th0, "change_to_randtl_%d:\n", label); | |
2125 | !!# if (label%2) { | |
2126 | !!# IJ_set_ropr_fld("diag.j", 410, Ro_tl, Ft_Simm13, "{3..5}"); | |
2127 | !!# IJ_generate_from_token("diag.j", 411,1, th0, ijdefault, tCHANGE_HPRIV, -1);; | |
2128 | !!# } else { | |
2129 | !!# IJ_set_ropr_fld("diag.j", 413, Ro_tl, Ft_Simm13, "{0..2}"); | |
2130 | !!# IJ_generate_from_token("diag.j", 414,1, th0, ijdefault, tCHANGE_PRIV, -1);; | |
2131 | !!# } | |
2132 | !!# label++; | |
2133 | !!# } | |
2134 | !!# ; | |
2135 | !!# | |
2136 | !!# change_to_tl1 : tCHANGE_TO_TL1 | |
2137 | !!# { | |
2138 | !!# IJ_printf("diag.j", 422, th0, "change_to_tl1_%d:\n", label); | |
2139 | !!# if (label%2) { | |
2140 | !!# IJ_printf("diag.j", 424, th0, "\tta T_CHANGE_HPRIV\n"); | |
2141 | !!# } else { | |
2142 | !!# IJ_printf("diag.j", 426, th0, "\tta T_CHANGE_PRIV\n"); | |
2143 | !!# } | |
2144 | !!# label++; | |
2145 | !!# } | |
2146 | !!# ; | |
2147 | !!# trap_asr : | |
2148 | !!# tRDPR_TPC | |
2149 | !!# | tRDPR_TSTATE | |
2150 | !!# | tRDPR_TT | |
2151 | !!# | tRDPR_TNPC | |
2152 | !!# | tRDPR_TBA | |
2153 | !!# | tRDPR_TL | |
2154 | !!# | tRDPR_GL | |
2155 | !!# | tRDHPR_HTBA | |
2156 | !!# | tRDHPR_HPSTATE | |
2157 | !!# | tRD_TICK_CMPR_REG | |
2158 | !!# | tRD_STICK_CMPR_REG | |
2159 | !!# | tRD_STICK_REG %ropr Ro_rd0 | |
2160 | !!# ; | |
2161 | !!# | |
2162 | !!# splash_lsucnt: tFBPULE | |
2163 | !!# { | |
2164 | !!# IJ_printf("diag.j", 448, th0, "splash_lsu_%d:\n", label); | |
2165 | !!# IJ_printf("diag.j", 449, th0, "\tset 0x%rx, %%r2\n", Rv_lsucntl); | |
2166 | !!# IJ_printf("diag.j", 450, th0, "\tstxa %%r2, [%%r0] ASI_LSU_CONTROL\n"); | |
2167 | !!# label++; | |
2168 | !!# } | |
2169 | !!# ; | |
2170 | !!# | |
2171 | !!# splash_tba: tWRPR_TBA_R %ropr Ro_tba | |
2172 | !!# { | |
2173 | !!# IJ_printf("diag.j", 457, th0, "splash_tba_%d:\n", label); | |
2174 | !!# IJ_printf("diag.j", 458, th0, "\tta T_CHANGE_PRIV\n"); | |
2175 | !!# if (label%3) { | |
2176 | !!# IJ_printf("diag.j", 460, th0, "\tset 0x120000, %%r2\n"); | |
2177 | !!# } else { | |
2178 | !!# IJ_printf("diag.j", 462, th0, "\tset 0x%08llrx, %%r2\n", Rv_tba); | |
2179 | !!# } | |
2180 | !!# label++; | |
2181 | !!# } | |
2182 | !!# ; | |
2183 | !!# splash_htba: tWRHPR_HTBA_R %ropr Ro_tba | |
2184 | !!# { | |
2185 | !!# IJ_printf("diag.j", 469, th0, "splash_htba_%d:\n", label); | |
2186 | !!# IJ_printf("diag.j", 470, th0, "\tta T_CHANGE_HPRIV\n"); | |
2187 | !!# if (label%3) { | |
2188 | !!# IJ_printf("diag.j", 472, th0, "\tset 0x80000, %%r2\n"); | |
2189 | !!# } else { | |
2190 | !!# IJ_printf("diag.j", 474, th0, "\tset 0x%08llrx, %%r2\n", Rv_htba); | |
2191 | !!# } | |
2192 | !!# label++; | |
2193 | !!# } | |
2194 | !!# ; | |
2195 | !!# | |
2196 | !!# splash_cmpr: tWR_STICK_REG_I | |
2197 | !!# { | |
2198 | !!# IJ_printf("diag.j", 482, th0, "splash_cmpr_%d:\n", label); | |
2199 | !!# IJ_set_rvar("diag.j", 483, Rv_rand_60,"64'h8rrrrrrr_rrrrrrrr"); | |
2200 | !!# IJ_set_ropr_fld("diag.j", 484, Ro_cmpr, Ft_Rs1, "{0}"); | |
2201 | !!# IJ_set_ropr_fld("diag.j", 485, Ro_cmpr, Ft_Rs2, "{1}"); | |
2202 | !!# IJ_printf ("diag.j", 486, th0,"\tnop\n\tmov 1, %%g2\n"); | |
2203 | !!# IJ_printf ("diag.j", 487, th0,"\tsllx %%g2, 63, %%g2\n"); | |
2204 | !!# IJ_printf ("diag.j", 488, th0,"\tor %%g1, %%g2, %%g1\n"); | |
2205 | !!# if (label%2) { | |
2206 | !!# IJ_generate_from_token("diag.j", 490,1, th0, Ro_cmpr, tWR_STICK_CMPR_REG_R, tWR_TICK_CMPR_REG_R, -1);; | |
2207 | !!# } else { | |
2208 | !!# IJ_printf("diag.j", 492, th0, "\twrhpr %%g1, %%g0, %%hsys_tick_cmpr\n"); | |
2209 | !!# } | |
2210 | !!# label++; | |
2211 | !!# } | |
2212 | !!# | |
2213 | !!# ; | |
2214 | !!# | |
2215 | !!# splash_gl : | |
2216 | !!# tWRPR_GL_I %ropr Ro_wrgl | |
2217 | !!# ; | |
2218 | !!# splash_tt : | |
2219 | !!# tWRPR_TT_I %ropr Ro_wrtt | |
2220 | !!# ; | |
2221 | !!# splash_fprs : | |
2222 | !!# tWRFPRS_I %ropr Ro_wrfprs | |
2223 | !!# ; | |
2224 | !!# | |
2225 | !!# splash_cwp : | |
2226 | !!# tWRPR_CWP_I %ropr Ro_wrcwp | |
2227 | !!# ; | |
2228 | !!# | |
2229 | !!# splash_pstate : | |
2230 | !!# tWRPR_PSTATE_I %ropr Ro_wrpstate | |
2231 | !!# ; | |
2232 | !!# | |
2233 | !!# splash_hpstate : | |
2234 | !!# tWRHPR_HPSTATE_I %ropr Ro_wrhpstate | |
2235 | !!# ; | |
2236 | !!# | |
2237 | !!# trap_asi : | |
2238 | !!# asi_load_r %ropr Ro_traps_asi | |
2239 | !!# ; | |
2240 | !!# | |
2241 | !!# wrasi : tWRASI_I %ropr Ro_wrasi_i | |
2242 | !!# ; | |
2243 | !!# reg_tcc : tTcc_R %ropr Ro_traps_r | |
2244 | !!# { | |
2245 | !!# if (label%2) { | |
2246 | !!# IJ_printf("diag.j", 530, th0, "\totherw\n\tmov 0x%rx, %%r30\n", Rv_init_trap); | |
2247 | !!# } else { | |
2248 | !!# IJ_printf("diag.j", 532, th0, "\tinvalw\n\tmov 0x%rx, %%r30\n", Rv_init_trap); | |
2249 | !!# } | |
2250 | !!# } | |
2251 | !!# ; | |
2252 | !!# | |
2253 | !!# tcc : | |
2254 | !!# tTcc_I %ropr Ro_traps_i | |
2255 | !!# | reg_tcc | |
2256 | !!# | |
2257 | !!# ; | |
2258 | !!# | |
2259 | !!# ldst_excp : | |
2260 | !!# ldds %ropr Ro_nontrap_ld | | |
2261 | !!# load_r %ropr Ro_nontrap_ld | | |
2262 | !!# load_i %ropr Ro_nontrap_ld | |
2263 | !!# | |
2264 | !!# ; | |
2265 | !!# | |
2266 | !!# ldstasi_excp : | |
2267 | !!# asi_load_i %ropr Ro_nontrap_ldasi | |
2268 | !!# ; | |
2269 | !!# ldstasi_excp_z : | |
2270 | !!# tLDUWA_R %ropr Ro_nontrap_ldasi_z | |
2271 | !!# ; | |
2272 | !!# | |
2273 | !!# ldds: tLDD_R | tLDD_I | tLDDA_I | tLDDA_R | |
2274 | !!# ; | |
2275 | !!# | |
2276 | !!# stores: | |
2277 | !!# stds %ropr Ro_ldst_ptr | | |
2278 | !!# stfs %ropr Ro_ldst_ptr | | |
2279 | !!# stqfs %ropr Ro_ldst_ptr | | |
2280 | !!# sts %ropr Ro_ldst_ptr | |
2281 | !!# ; | |
2282 | !!# stds: tSTDA_R | tSTDA_I | tSTD_R | tSTD_I | tSTDF_R | tSTDF_I | |
2283 | !!# ; | |
2284 | !!# stfs: tSTF_R | tSTF_I | |
2285 | !!# ; | |
2286 | !!# stqfs: tSTQF_R | tSTQF_I | |
2287 | !!# ; | |
2288 | !!# sts: tSTB_R | tSTB_I | tSTH_R | tSTH_I | tSTW_R | tSTW_I | tSTX_R | tSTX_I | |
2289 | !!# | |
2290 | !!# ; | |
2291 | !!# | |
2292 | !!# load_r: tLDSB_R | tLDSH_R | tLDSW_R | tLDUB_R | tLDUH_R | tLDUW_R | tLDQF_R | |
2293 | !!# ; | |
2294 | !!# | |
2295 | !!# load_i: tLDSB_I | tLDSH_I | tLDSW_I | tLDUB_I | tLDUH_I | tLDX_I | |
2296 | !!# | tLDQFA_I | |
2297 | !!# ; | |
2298 | !!# | |
2299 | !!# asi_load_i: tLDSBA_I | tLDSHA_I | tLDSWA_I | tLDUBA_I | tLDUHA_I | tLDXA_I | |
2300 | !!# ; | |
2301 | !!# | |
2302 | !!# asi_load_r:tLDSBA_R | tLDSHA_R | tLDSWA_R | tLDUBA_R | tLDUHA_R | tLDXA_R | |
2303 | !!# ; | |
2304 | !!# | |
2305 | !!# asi_store_i: tSTBA_I | tSTHA_I | tSTWA_I | tSTXA_I | |
2306 | !!# ; | |
2307 | !!# | |
2308 | !!# asi_store_r: tSTBA_R | tSTHA_R | tSTWA_R | tSTXA_R | |
2309 | !!# ; | |
2310 | !!# | |
2311 | !!# alu : | |
2312 | !!# tADDcc_R | tADDcc_I | tADDCcc_I | tANDNcc_R | | |
2313 | !!# tMULX_R | tUMULcc_R | tUMULcc_I | tSDIVcc_I | tSDIVcc_R | | |
2314 | !!# tSMULcc_R | tSDIVX_R | tUDIVX_R | | |
2315 | !!# tUDIVX_I | tFDIVs | tFDIVd | tFDIVq | tSWAP_I %ropr Ro_ldst_ptr | | |
2316 | !!# tSWAPA_R %ropr Ro_ldst_ptr | tCASA_I %ropr Ro_ldst_ptr | tPOPC_I | | |
2317 | !!# tFSQRTq | tFSQRTd | tFsMULd | tFdMULq | tFqTOi | tFNEGd | tFONES | |
2318 | !!# ; | |
2319 | !!# | |
2320 | !!# br : tBA | tBLE | tBGE | tBL | tBGU | tBLEU | tBN | tBNE | tBE | tBG | | |
2321 | !!# tBCC | tBCS | tBPOS | tBNEG | tBVC | tBVS | tBPA | tBPN | tBPNE | | |
2322 | !!# tBPE | tBPG | tBPLE | tBPGE | tBPL | tBPGU | tBPLEU | tBPCC | tBPCS | | |
2323 | !!# tBPPOS | tBPNEG | tBPVC | tBPVS | |
2324 | !!# ; | |
2325 | !!# | |
2326 | !!# branches : br | br_badelay | br_longdelay; | |
2327 | !!# | |
2328 | !!# br_badelay : tRD_SOFTINT_REG | |
2329 | !!# { | |
2330 | !!# IJ_printf("diag.j", 616, th0, "DS_%d:\n", label); label++; | |
2331 | !!# IJ_generate_from_token("diag.j", 617,1, th0, ijdefault, tBN, tBNE, tBE, tBG, -1);; | |
2332 | !!# IJ_generate_from_token("diag.j", 618,1, th0, ijdefault, tSTQF_I, tSTQF_R, -1);; | |
2333 | !!# IJ_printf("diag.j", 619, th0, "\tnormalw\n"); | |
2334 | !!# } | |
2335 | !!# | tALLIGNADDRESS | |
2336 | !!# { | |
2337 | !!# IJ_printf("diag.j", 623, th0, "DS_%d:\n", label); label++; | |
2338 | !!# IJ_generate_from_token("diag.j", 624,1, th0, ijdefault, tBN, tBNE, tBE, tBG, -1);; | |
2339 | !!# if (! label%3) { | |
2340 | !!# IJ_generate_from_token("diag.j", 626,1, th0, ijdefault,tFDIVd, tPOPC_I, -1);; | |
2341 | !!# } else if (label%3 == 1) { | |
2342 | !!# IJ_printf("diag.j", 628, th0, "\tallclean\n"); | |
2343 | !!# } else { | |
2344 | !!# IJ_printf("diag.j", 630, th0, "\tpdist %%f%rd, %%f%rd, %%f%rd\n", Rv_pdist_reg, Rv_pdist_reg, Rv_pdist_reg); | |
2345 | !!# } | |
2346 | !!# } | |
2347 | !!# | tFADDs | |
2348 | !!# { | |
2349 | !!# IJ_printf("diag.j", 635, th0, "DS_%d:\n", label); label++; | |
2350 | !!# IJ_generate_from_token("diag.j", 636,1, th0, ijdefault, tBN, tBNE, tBE, tBG, -1);; | |
2351 | !!# if (label%2) { | |
2352 | !!# //IJ_printf(th0, "\t.xword 0x%rx\t! Random illegal ?\n", Rv_illtrap); | |
2353 | !!# IJ_printf("diag.j", 639, th0, "\tilltrap\n"); | |
2354 | !!# } else { | |
2355 | !!# IJ_generate_from_token("diag.j", 641,1, th0, ijdefault, tBN, tBNE, tBE, tBG, -1);; | |
2356 | !!# } | |
2357 | !!# IJ_generate_from_token("diag.j", 643,1, th0, ijdefault, tFSQRTd, tLDQF_R, -1);; | |
2358 | !!# } | |
2359 | !!# | |
2360 | !!# ; | |
2361 | !!# | |
2362 | !!# br_longdelay : tSAVE_R %ropr Ro_save_restore | |
2363 | !!# { | |
2364 | !!# IJ_printf("diag.j", 650, th0, "DS_%d:\n", label); label++; | |
2365 | !!# IJ_generate_from_token("diag.j", 651,1, th0, ijdefault, tBN, tBNE, tBE, tBG, -1);; | |
2366 | !!# } | |
2367 | !!# | tRESTORE_R %ropr Ro_save_restore | |
2368 | !!# { | |
2369 | !!# IJ_printf("diag.j", 655, th0, "DS_%d:\n", label); label++; | |
2370 | !!# IJ_generate_from_token("diag.j", 656,1, th0, ijdefault, tBN, tBNE, tBE, tBG, -1);; | |
2371 | !!# } | |
2372 | !!# | tWRPR_CLEANWIN_I %ropr Ro_winops | tWRPR_WSTATE_I %ropr Ro_winops | |
2373 | !!# { | |
2374 | !!# IJ_printf("diag.j", 660, th0, "DS_%d:\n", label); label++; | |
2375 | !!# IJ_printf("diag.j", 661, th0, "\tnop\n\tnot %%g0, %%g2\n"); | |
2376 | !!# IJ_printf("diag.j", 662, th0, "\tjmp %%g2\n"); | |
2377 | !!# } | |
2378 | !!# ; | |
2379 | !!# | |
2380 | !!# | |
2381 | !!# | |
2382 | !!# %% | |
2383 | !!# %%section cbfunc | |
2384 | !!# | |
2385 | !!# %% | |
2386 | !!# %%section stat | |
2387 | !!# | |
2388 | !!# %% | |
2389 | #endif | |
2390 |