xref: /titanic_41/usr/src/cmd/trapstat/capabilities/sun4/gettrapent.c (revision 6a3e8e8695d5c7d1d18c6800d676990d7f61a2a4)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24  */
25 
26 #include <sys/trapstat.h>
27 #include "_trapstat.h"
28 
29 static tstat_ent_t g_traps[TSTAT_NENT] = {
30 #ifndef	sun4v
31 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
32 	{ "power-on", 		"power on reset" },
33 	{ "watchdog", 		"watchdog reset" },
34 	{ "xir", 		"externally initiated reset" },
35 	{ "sir", 		"software initiated reset" },
36 	{ "red", 		"RED state exception" },
37 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
38 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
39 	{ "immu-xcp", 		"instruction access exception" },
40 	{ "immu-miss", 		"instruction access MMU miss" },
41 	{ "immu-err", 		"instruction access error" },
42 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
43 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
44 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
45 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
46 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
47 	{ "ill-inst", 		"illegal instruction" },
48 	{ "priv-inst", 		"privileged opcode" },
49 	{ "unimp-ldd", 		"unimplemented LDD" },
50 	{ "unimp-std", 		"unimplemented STD" },
51 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
52 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
53 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
54 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
55 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
56 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
57 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
58 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
59 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
60 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
61 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
62 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
63 	{ "fp-disabled", 	"fp disabled" },
64 	{ "fp-ieee754", 	"fp exception ieee754" },
65 	{ "fp-xcp-other", 	"fp exception other" },
66 	{ "tag-oflow", 		"tag overflow" },
67 	{ "cleanwin", 		"clean window" },
68 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
69 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
70 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
71 	{ "div-zero", 		"division by zero" },
72 	{ "internal-err", 	"internal processor error" },
73 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
74 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
75 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
76 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
77 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
78 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
79 	{ "dmmu-xcp", 		"data access exception" },
80 	{ "dmmu-miss", 		"data access MMU miss" },
81 	{ "dmmu-err", 		"data access error" },
82 	{ "dmmu-prot", 		"data access protection" },
83 	{ "unalign", 		"mem address not aligned" },
84 	{ "lddf-unalign", 	"LDDF mem address not aligned" },
85 	{ "stdf-unalign", 	"STDF mem address not aligned" },
86 	{ "priv-act", 		"privileged action" },
87 	{ "ldqf-unalign",	"LDQF mem address not aligned" },
88 	{ "stqf-unalign", 	"STQF mem address not aligned" },
89 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
90 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
91 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
92 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
93 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
94 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
95 	{ "async-d-err", 	"async data error" },
96 	{ "level-1", 		"interrupt level 1" },
97 	{ "level-2", 		"interrupt level 2" },
98 	{ "level-3", 		"interrupt level 3" },
99 	{ "level-4", 		"interrupt level 4" },
100 	{ "level-5", 		"interrupt level 5" },
101 	{ "level-6", 		"interrupt level 6" },
102 	{ "level-7", 		"interrupt level 7" },
103 	{ "level-8", 		"interrupt level 8" },
104 	{ "level-9", 		"interrupt level 9" },
105 	{ "level-10", 		"interrupt level 10" },
106 	{ "level-11", 		"interrupt level 11" },
107 	{ "level-12", 		"interrupt level 12" },
108 	{ "level-13", 		"interrupt level 13" },
109 	{ "level-14", 		"interrupt level 14" },
110 	{ "level-15", 		"interrupt level 15" },
111 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
112 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
113 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
114 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
115 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
116 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
117 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
118 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
119 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
120 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
121 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
122 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
123 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
124 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
125 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
126 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
127 	{ "int-vec", 		"interrupt vector" },
128 	{ "pa-watch", 		"PA watchpoint" },
129 	{ "va-watch", 		"VA watchpoint" },
130 	{ "ecc-err", 		"corrected ECC error" },
131 	{ "itlb-miss", 		"instruction access MMU miss" },
132 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
133 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
134 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
135 	{ "dtlb-miss", 		"data access MMU miss" },
136 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
137 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
138 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
139 	{ "dtlb-prot", 		"data access protection" },
140 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
141 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
142 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
143 	{ "fast-ecc",		"fast ECC error" },
144 	{ "dcache-parity",	"D-cache parity error" },
145 	{ "icache-parity",	"I-cache parity error" },
146 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
147 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
148 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
149 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
150 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
151 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
152 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
153 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
154 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
155 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
156 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
157 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
158 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
159 #else /* sun4v */
160 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
161 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
162 	{ "watchdog", 		"watchdog reset" },
163 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
164 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
165 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
166 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
167 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
168 	{ "immu-xcp", 		"instruction access exception" },
169 	{ "immu-miss", 		"instruction access MMU miss" },
170 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
171 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
172 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
173 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
174 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
175 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
176 	{ "ill-inst", 		"illegal instruction" },
177 	{ "priv-inst", 		"privileged opcode" },
178 	{ "unimp-ldd", 		"unimplemented LDD" },
179 	{ "unimp-std", 		"unimplemented STD" },
180 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
181 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
182 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
183 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
184 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
185 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
186 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
187 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
188 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
189 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
190 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
191 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
192 	{ "fp-disabled", 	"fp disabled" },
193 	{ "fp-ieee754", 	"fp exception ieee754" },
194 	{ "fp-xcp-other", 	"fp exception other" },
195 	{ "tag-oflow", 		"tag overflow" },
196 	{ "cleanwin", 		"clean window" },
197 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
198 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
199 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
200 	{ "div-zero", 		"division by zero" },
201 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
202 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
203 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
204 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
205 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
206 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
207 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
208 	{ "dmmu-xcp", 		"data access exception" },
209 	{ "dmmu-miss", 		"data access MMU miss" },
210 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
211 	{ "dmmu-prot", 		"data access protection" },
212 	{ "unalign", 		"mem address not aligned" },
213 	{ "lddf-unalign", 	"LDDF mem address not aligned" },
214 	{ "stdf-unalign", 	"STDF mem address not aligned" },
215 	{ "priv-act", 		"privileged action" },
216 	{ "ldqf-unalign",	"LDQF mem address not aligned" },
217 	{ "stqf-unalign", 	"STQF mem address not aligned" },
218 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
219 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
220 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
221 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
222 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
223 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
224 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
225 	{ "level-1", 		"interrupt level 1" },
226 	{ "level-2", 		"interrupt level 2" },
227 	{ "level-3", 		"interrupt level 3" },
228 	{ "level-4", 		"interrupt level 4" },
229 	{ "level-5", 		"interrupt level 5" },
230 	{ "level-6", 		"interrupt level 6" },
231 	{ "level-7", 		"interrupt level 7" },
232 	{ "level-8", 		"interrupt level 8" },
233 	{ "level-9", 		"interrupt level 9" },
234 	{ "level-10", 		"interrupt level 10" },
235 	{ "level-11", 		"interrupt level 11" },
236 	{ "level-12", 		"interrupt level 12" },
237 	{ "level-13", 		"interrupt level 13" },
238 	{ "level-14", 		"interrupt level 14" },
239 	{ "level-15", 		"interrupt level 15" },
240 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
241 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
242 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
243 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
244 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
245 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
246 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
247 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
248 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
249 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
250 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
251 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
252 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
253 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
254 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
255 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
256 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
257 	{ "pa-watch", 		"PA watchpoint" },
258 	{ "va-watch", 		"VA watchpoint" },
259 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
260 	{ "itlb-miss", 		"instruction access MMU miss" },
261 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
262 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
263 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
264 	{ "dtlb-miss", 		"data access MMU miss" },
265 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
266 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
267 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
268 	{ "dtlb-prot", 		"data access protection" },
269 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
270 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
271 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
272 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
273 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
274 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
275 	{ "ctl-xfer",		"control transfer" },
276 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
277 	{ "instr-brkpt",	"instruction breakpoint" },
278 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
279 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
280 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
281 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
282 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
283 	{ "hw-changed", 	"hardware changed" },
284 	{ "cpu_mondo", 		"cpu mondo trap" },
285 	{ "dev_mondo", 		"device mondo trap" },
286 	{ "res-err", 		"resumable error" },
287 	{ "nonres-err",		"non-resumable error" },
288 #endif /* sun4v */
289 	{ "spill-0-normal", 	"spill 0 normal" },
290 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
291 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
292 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
293 	{ "spill-user-32", 	"spill user window, 32-bit" },
294 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
295 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
296 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
297 	{ "spill-user-64", 	"spill user window, 64-bit" },
298 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
299 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
300 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
301 	{ "spill-user-32-cln", 	"spill, clean user window, 32-bit" },
302 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
303 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
304 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
305 	{ "spill-user-64-cln", 	"spill, clean user window, 64-bit" },
306 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
307 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
308 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
309 	{ "spill-kern-32", 	"spill kernel window, 32-bit" },
310 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
311 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
312 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
313 	{ "spill-kern-64", 	"spill kernel window, 64-bit" },
314 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
315 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
316 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
317 	{ "spill-mixed", 	"spill window, mixed 32-bit/64-bit" },
318 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
319 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
320 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
321 	{ "spill-0-other", 	"spill 0 other" },
322 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
323 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
324 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
325 	{ "spill-asuser-32", 	"spill user window as kernel, 32-bit" },
326 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
327 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
328 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
329 	{ "spill-asuser-64", 	"spill user window as kernel, 64-bit" },
330 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
331 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
332 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
333 	{ "spill-asuser-32-cln", "spill, clean user window as kernel, 32-bit" },
334 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
335 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
336 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
337 	{ "spill-asuser-64-cln", "spill, clean user window as kernel, 64-bit" },
338 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
339 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
340 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
341 	{ "spill-5-other", 	"spill 5 other" },
342 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
343 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
344 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
345 	{ "spill-6-other", 	"spill 6 other" },
346 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
347 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
348 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
349 	{ "spill-7-other", 	"spill 7 other" },
350 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
351 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
352 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
353 	{ "fill-0-normal", 	"fill 0 normal" },
354 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
355 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
356 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
357 	{ "fill-user-32", 	"fill user window, 32-bit" },
358 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
359 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
360 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
361 	{ "fill-user-64", 	"fill user window, 64-bit" },
362 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
363 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
364 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
365 	{ "fill-user-32-cln", 	"fill user window, 32-bit" },
366 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
367 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
368 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
369 	{ "fill-user-64-cln", 	"fill user window, 64-bit" },
370 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
371 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
372 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
373 	{ "fill-kern-32", 	"fill kernel window, 32-bit" },
374 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
375 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
376 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
377 	{ "fill-kern-64", 	"fill kernel window, 64-bit" },
378 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
379 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
380 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
381 	{ "fill-mixed", 	"fill window, mixed 32-bit/64-bit" },
382 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
383 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
384 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
385 	{ "fill-0-other", 	"fill 0 other" },
386 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
387 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
388 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
389 	{ "fill-asuser-32", 	"fill user window as kernel, 32-bit" },
390 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
391 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
392 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
393 	{ "fill-asuser-64", 	"fill user window as kernel, 64-bit" },
394 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
395 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
396 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
397 	{ "fill-asuser-32-cln", "fill user window as kernel, 32-bit" },
398 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
399 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
400 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
401 	{ "fill-asuser-64-cln",	"fill user window as kernel, 64-bit" },
402 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
403 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
404 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
405 	{ "fill-5-other", 	"fill 5 other" },
406 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
407 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
408 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
409 	{ "fill-6-other", 	"fill 6 other" },
410 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
411 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
412 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
413 	{ "fill-7-other", 	"fill 7 other" },
414 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
415 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
416 	{ NULL, NULL,		TSTAT_ENT_CONTINUED },
417 	{ "syscall-4x", 	"old system call" },
418 	{ "usr-brkpt", 		"user breakpoint" },
419 	{ "usr-div-zero", 	"user divide by zero" },
420 	{ "flush-wins", 	"flush windows" },
421 	{ "clean-wins", 	"clean windows" },
422 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
423 	{ "fix-align", 		"fix unaligned references" },
424 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
425 	{ "syscall-32", 	"ILP32 system call" },
426 	{ "set-t0-addr", 	"set trap0 address" },
427 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
428 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
429 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
430 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
431 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
432 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
433 	{ "trap-inst-16", 	"trap instruction 16", },
434 	{ "trap-inst-17", 	"trap instruction 17", },
435 	{ "trap-inst-18", 	"trap instruction 18", },
436 	{ "trap-inst-19", 	"trap instruction 19", },
437 	{ "trap-inst-20", 	"trap instruction 20", },
438 	{ "trap-inst-21", 	"trap instruction 21", },
439 	{ "trap-inst-22", 	"trap instruction 22", },
440 	{ "trap-inst-23", 	"trap instruction 23", },
441 	{ "trap-inst-24", 	"trap instruction 24", },
442 	{ "trap-inst-25", 	"trap instruction 25", },
443 	{ "trap-inst-26", 	"trap instruction 26", },
444 	{ "trap-inst-27", 	"trap instruction 27", },
445 	{ "trap-inst-28", 	"trap instruction 28", },
446 	{ "trap-inst-29", 	"trap instruction 29", },
447 	{ "trap-inst-30", 	"trap instruction 30", },
448 	{ "trap-inst-31", 	"trap instruction 31", },
449 	{ "get-cc", 		"get condition codes" },
450 	{ "set-cc", 		"set condition codes" },
451 	{ "get-psr", 		"get psr" },
452 	{ "set-psr", 		"set psr (some fields)" },
453 	{ "getts", 		"get timestamp" },
454 	{ "gethrvtime", 	"get lwp virtual time" },
455 	{ "self-xcall", 	"self xcall" },
456 	{ "gethrtime", 		"get hrestime" },
457 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
458 	{ "getlgrp",		"get lgrpid" },
459 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
460 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
461 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
462 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
463 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
464 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
465 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
466 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
467 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
468 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
469 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
470 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
471 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
472 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
473 	{ "dtrace-pid",		"DTrace pid provider" },
474 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
475 	{ "dtrace-return",	"DTrace pid provider return" },
476 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
477 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
478 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
479 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
480 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
481 	{ "syscall-64", 	"LP64 system call" },
482 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
483 	{ "tt-freeze", 		"freeze traptrace" },
484 	{ "tt-unfreeze", 	"unfreeze traptrace" },
485 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
486 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
487 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
488 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
489 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
490 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
491 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
492 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
493 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
494 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
495 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
496 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
497 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
498 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
499 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
500 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
501 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
502 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
503 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
504 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
505 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
506 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
507 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
508 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
509 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
510 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
511 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
512 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
513 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
514 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
515 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
516 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
517 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
518 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
519 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
520 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
521 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
522 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
523 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
524 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
525 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
526 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
527 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
528 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
529 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
530 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
531 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
532 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
533 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
534 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
535 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
536 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
537 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
538 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
539 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
540 	{ NULL, NULL,		TSTAT_ENT_UNUSED },
541 	{ "ptl1-panic", 	"test ptl1-panic" },
542 	{ "kmdb-enter", 	"kmdb enter (L1-A)" },
543 	{ "kmdb-brkpt", 	"kmdb breakpoint" },
544 	{ "obp-brkpt", 		"obp breakpoint" },
545 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
546 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
547 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
548 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
549 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
550 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
551 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
552 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
553 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
554 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
555 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
556 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
557 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
558 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
559 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
560 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
561 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
562 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
563 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
564 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
565 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
566 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
567 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
568 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
569 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
570 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
571 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
572 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
573 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
574 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
575 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
576 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
577 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
578 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
579 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
580 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
581 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
582 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
583 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
584 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
585 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
586 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
587 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
588 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
589 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
590 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
591 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
592 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
593 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
594 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
595 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
596 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
597 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
598 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
599 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
600 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
601 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
602 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
603 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
604 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
605 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
606 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
607 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
608 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
609 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
610 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
611 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
612 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
613 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
614 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
615 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
616 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
617 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
618 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
619 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
620 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
621 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
622 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
623 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
624 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
625 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
626 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
627 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
628 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
629 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
630 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
631 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
632 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
633 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
634 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
635 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
636 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
637 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
638 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
639 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
640 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
641 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
642 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
643 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
644 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
645 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
646 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
647 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
648 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
649 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
650 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
651 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
652 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
653 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
654 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
655 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
656 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
657 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
658 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
659 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
660 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
661 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
662 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
663 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
664 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
665 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
666 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
667 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
668 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
669 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
670 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
671 	{ NULL, NULL,		TSTAT_ENT_RESERVED },
672 	{ NULL, NULL,		TSTAT_ENT_RESERVED }
673 };
674 
675 tstat_ent_t *
676 get_trap_ent(int ndx)
677 {
678 	return (&g_traps[ndx]);
679 }
680