Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: lsu_dcache_diagnostic.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_HV_ALSO | |
39 | #define MAIN_PAGE_NUCLEUS_ALSO | |
40 | ||
41 | #include "hboot.s" | |
42 | ||
43 | /************************************************************************ | |
44 | Test case code start | |
45 | ************************************************************************/ | |
46 | ||
47 | .text | |
48 | .global main | |
49 | ||
50 | main: /* test begin */ | |
51 | ||
52 | ta T_CHANGE_HPRIV | |
53 | ERR_OFF: | |
54 | setx 0x10, %i0, %g1 | |
55 | stxa %g0, [%g1] 0x4c | |
56 | ||
57 | set 1, %l0 | |
58 | sllx %l0, 13, %l0 | |
59 | ||
60 | DIAGNOS_TAG: | |
61 | !! addr = 1d50 (index=85, way=3) tag = 84a2604 d1 = 22112909f6ee0ffc d2 = eb2e2bb83d3ada45 | |
62 | setx 0x1d50, %i0, %g1 | |
63 | setx 0x84a2604, %i0, %g2 | |
64 | stxa %g2, [%g1] 0x47 | |
65 | setx 0x22112909f6ee0ffc, %i0, %g2 | |
66 | stxa %g2, [%g1] 0x46 | |
67 | add %g1, 8, %g1 | |
68 | setx 0xeb2e2bb83d3ada45, %i0, %g2 | |
69 | stxa %g2, [%g1] 0x46 | |
70 | ||
71 | DIAGNOS_DATA: | |
72 | !! addr = 1d50 tag = 84a2604 d1 = 22112909f6ee0ffc d2 = eb2e2bb83d3ada45 | |
73 | setx 0x1d50, %i0, %g1 | |
74 | setx 0x84a2604, %i0, %g2 | |
75 | ldxa [%g1] 0x47, %l2 | |
76 | setx 0x7fffffff, %i0, %i1 | |
77 | and %i1, %l2, %l2 | |
78 | cmp %g2, %l2 | |
79 | bne bad_end | |
80 | setx 0x22112909f6ee0ffc, %i0, %g3 | |
81 | or %g1, %l0, %g1 | |
82 | ldxa [%g1] 0x46, %l3 | |
83 | cmp %g3, %l3 | |
84 | bne bad_end | |
85 | add %g1, 8, %g1 | |
86 | setx 0xeb2e2bb83d3ada45, %i0, %g4 | |
87 | ldxa [%g1] 0x46, %l4 | |
88 | cmp %g4, %l4 | |
89 | bne bad_end | |
90 | ||
91 | DIAGNOS_VALID_WAY3: | |
92 | !! addr = 1d50 (index=55, way=3) tag = 84a2604 d1 = 22112909f6ee0ffc d2 = eb2e2bb83d3ada45 | |
93 | setx 0x1d50, %i0, %g1 | |
94 | setx 0x84a2606, %i0, %g2 | |
95 | stxa %g2, [%g1] 0x47 | |
96 | setx 0x22112909f6ee0ffc, %i0, %g2 | |
97 | stxa %g2, [%g1] 0x46 | |
98 | add %g1, 8, %g1 | |
99 | setx 0xeb2e2bb83d3ada45, %i0, %g2 | |
100 | stxa %g2, [%g1] 0x46 | |
101 | ||
102 | REG_LOAD_WAY3: | |
103 | setx 0x10944c0d50, %i0, %g1 | |
104 | setx 0x22112909f6ee0ffc, %i0, %g3 | |
105 | ldxa [%g1]0x80, %g4 | |
106 | cmp %g3, %g4 | |
107 | bne bad_end | |
108 | ||
109 | DIAGNOS_VALID_WAY2: | |
110 | !! addr = 1750 (index=75, way=2) tag = 84a2604 d1 = 22112909f6ee0ffc d2 = eb2e2bb83d3ada45 | |
111 | setx 0x1750, %i0, %g1 | |
112 | setx 0x84a2606, %i0, %g2 | |
113 | stxa %g2, [%g1] 0x47 | |
114 | setx 0x22112909f6ee0ffc, %i0, %g2 | |
115 | stxa %g2, [%g1] 0x46 | |
116 | add %g1, 8, %g1 | |
117 | setx 0xeb2e2bb83d3ada45, %i0, %g2 | |
118 | stxa %g2, [%g1] 0x46 | |
119 | ||
120 | REG_LOAD_WAY2: | |
121 | setx 0x10944c0f50, %i0, %g1 | |
122 | setx 0x22112909f6ee0ffc, %i0, %g3 | |
123 | ldxa [%g1]0x80, %g5 | |
124 | cmp %g3, %g5 | |
125 | bne bad_end | |
126 | ||
127 | DIAGNOS_VALID_WAY1: | |
128 | !! addr = 0d50 (index=55, way=1) tag = 84a2604 d1 = 22112909f6ee0ffc d2 = eb2e2bb83d3ada45 | |
129 | setx 0x1750, %i0, %g1 | |
130 | setx 0x84a2606, %i0, %g2 | |
131 | stxa %g2, [%g1] 0x47 | |
132 | setx 0x22112909f6ee0ffc, %i0, %g2 | |
133 | stxa %g2, [%g1] 0x46 | |
134 | add %g1, 8, %g1 | |
135 | setx 0xeb2e2bb83d3ada45, %i0, %g2 | |
136 | stxa %g2, [%g1] 0x46 | |
137 | ||
138 | REG_LOAD_WAY1: | |
139 | setx 0x10944c0d50, %i0, %g1 | |
140 | setx 0x22112909f6ee0ffc, %i0, %g3 | |
141 | ldxa [%g1]0x80, %g6 | |
142 | cmp %g3, %g6 | |
143 | bne bad_end | |
144 | ||
145 | DIAGNOS_VALID_WAY0: | |
146 | !! addr = 0750 (index=75, way=0) tag = 84a2604 d1 = 22112909f6ee0ffc d2 = eb2e2bb83d3ada45 | |
147 | setx 0x0750, %i0, %g1 | |
148 | setx 0x84a2606, %i0, %g2 | |
149 | stxa %g2, [%g1] 0x47 | |
150 | setx 0x22112909f6ee0ffc, %i0, %g2 | |
151 | stxa %g2, [%g1] 0x46 | |
152 | add %g1, 8, %g1 | |
153 | setx 0xeb2e2bb83d3ada45, %i0, %g2 | |
154 | stxa %g2, [%g1] 0x46 | |
155 | ||
156 | REG_LOAD_WAY0: | |
157 | setx 0x10944c0f50, %i0, %g1 | |
158 | setx 0x22112909f6ee0ffc, %i0, %g3 | |
159 | ldxa [%g1]0x80, %g7 | |
160 | cmp %g3, %g7 | |
161 | bne bad_end | |
162 | ||
163 | ||
164 | nop | |
165 | EXIT_GOOD | |
166 | nop | |
167 | nop | |
168 | ||
169 | bad_end: | |
170 | EXIT_BAD | |
171 | nop | |
172 | nop | |
173 | /************************************************************************ | |
174 | Test case data start | |
175 | ************************************************************************/ | |
176 | .data | |
177 | ||
178 | user_data_start: | |
179 | .xword 0x0001020304050607 | |
180 | .xword 0x08090a0b0c0d0e0f | |
181 | .xword 0x1011121314151617 | |
182 | .xword 0x18191a1b1c1d1e1f | |
183 | .xword 0x2021222324252627 | |
184 | .xword 0x28292a2b2c2d2e2f | |
185 | .xword 0x3031323334353637 | |
186 | .xword 0x38393a3b3c3d3e3f | |
187 | .xword 0x4041424344454647 | |
188 | .xword 0x48494a4b4c4d4e4f | |
189 | .xword 0x5051525354555657 | |
190 | .xword 0x58595a5b5c5d5e5f | |
191 | .xword 0x6061626364656667 | |
192 | .xword 0x68696a6b6c6d6e6f | |
193 | .xword 0x7071727374757677 | |
194 | .xword 0x78797a7b7c7d7e7f | |
195 | .xword 0x8081828384858687 | |
196 | .xword 0x88898a8b8c8d8e8f | |
197 | .xword 0x9091929394959697 | |
198 | .xword 0x98999a9b9c9d9e9f | |
199 | .xword 0xa0a1a2a3a4a5a6a7 | |
200 | .xword 0xa8a9aaabacadaeaf | |
201 | .xword 0xb0b1b2b3b4b5b6b7 | |
202 | .xword 0xb8b9babbbcbdbebf | |
203 | .xword 0xc0c1c2c3c4c5c6c7 | |
204 | .xword 0xc8c9cacbcccdcecf | |
205 | .xword 0xd0d1d2d3d4d5d6d7 | |
206 | .xword 0xd8d9dadbdcdddedf | |
207 | .xword 0xe0e1e2e3e4e5e6e7 | |
208 | .xword 0xe8e9eaebecedeeef | |
209 | .xword 0xf0f1f2f3f4f5f6f7 | |
210 | .xword 0xf8f9fafbfcfdfeff | |
211 | .end |