xref: /onnv-gate/usr/src/uts/sparc/v9/sys/machtrap.h (revision 518:e3f6e739f5ed)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
50Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
60Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
70Sstevel@tonic-gate  * with the License.
80Sstevel@tonic-gate  *
90Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate  * See the License for the specific language governing permissions
120Sstevel@tonic-gate  * and limitations under the License.
130Sstevel@tonic-gate  *
140Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate  *
200Sstevel@tonic-gate  * CDDL HEADER END
210Sstevel@tonic-gate  */
220Sstevel@tonic-gate /*
230Sstevel@tonic-gate  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate #ifndef	_SYS_MACHTRAP_H
280Sstevel@tonic-gate #define	_SYS_MACHTRAP_H
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #ifdef	__cplusplus
330Sstevel@tonic-gate extern "C" {
340Sstevel@tonic-gate #endif
350Sstevel@tonic-gate 
360Sstevel@tonic-gate /*
370Sstevel@tonic-gate  * This file is machine specific as is.
380Sstevel@tonic-gate  * Some trap types could be made common
390Sstevel@tonic-gate  * for all sparcs, but that is a project
400Sstevel@tonic-gate  * in and of itself.
410Sstevel@tonic-gate  */
420Sstevel@tonic-gate 
430Sstevel@tonic-gate /*
440Sstevel@tonic-gate  * Hardware traps.
450Sstevel@tonic-gate  */
460Sstevel@tonic-gate #define	T_POR			0x001
470Sstevel@tonic-gate #define	T_WDR			0x002
480Sstevel@tonic-gate #define	T_XIR			0x003
490Sstevel@tonic-gate #define	T_SIR			0x004
500Sstevel@tonic-gate #define	T_RED_EXCEPTION		0x005
510Sstevel@tonic-gate #define	T_INSTR_EXCEPTION	0x008
520Sstevel@tonic-gate #define	T_INSTR_MMU_MISS	0x009
530Sstevel@tonic-gate #define	T_INSTR_ERROR		0x00A
540Sstevel@tonic-gate #define	T_UNIMP_INSTR		0x010
550Sstevel@tonic-gate #define	T_PRIV_INSTR		0x011
56*518Swsm #define	T_UNIMP_LDD		0x012
57*518Swsm #define	T_UNIMP_STD		0x013
580Sstevel@tonic-gate #define	T_FP_DISABLED		0x020
590Sstevel@tonic-gate #define	T_FP_EXCEPTION_IEEE	0x021
600Sstevel@tonic-gate #define	T_FP_EXCEPTION_OTHER	0x022
610Sstevel@tonic-gate #define	T_TAG_OVERFLOW		0x023
620Sstevel@tonic-gate #define	T_CLEAN_WINDOW		0x024
630Sstevel@tonic-gate #define	T_IDIV0			0x028
640Sstevel@tonic-gate #define	T_DATA_EXCEPTION	0x030
650Sstevel@tonic-gate #define	T_DATA_MMU_MISS		0x031
660Sstevel@tonic-gate #define	T_DATA_ERROR		0x032
670Sstevel@tonic-gate #define	T_DATA_PROT		0x033
680Sstevel@tonic-gate #define	T_ALIGNMENT		0x034
690Sstevel@tonic-gate #define	T_LDDF_ALIGN		0x035
700Sstevel@tonic-gate #define	T_STDF_ALIGN		0x036
710Sstevel@tonic-gate #define	T_PRIV_ACTION		0x037
720Sstevel@tonic-gate #define	T_ASYNC_ERROR		0x040
730Sstevel@tonic-gate #define	T_INT_LEVEL_1		0x041
740Sstevel@tonic-gate #define	T_INT_LEVEL_2		0x042
750Sstevel@tonic-gate #define	T_INT_LEVEL_3		0x043
760Sstevel@tonic-gate #define	T_INT_LEVEL_4		0x044
770Sstevel@tonic-gate #define	T_INT_LEVEL_5		0x045
780Sstevel@tonic-gate #define	T_INT_LEVEL_6		0x046
790Sstevel@tonic-gate #define	T_INT_LEVEL_7		0x047
800Sstevel@tonic-gate #define	T_INT_LEVEL_8		0x048
810Sstevel@tonic-gate #define	T_INT_LEVEL_9		0x049
820Sstevel@tonic-gate #define	T_INT_LEVEL_10		0x04A
830Sstevel@tonic-gate #define	T_INT_LEVEL_11		0x04B
840Sstevel@tonic-gate #define	T_INT_LEVEL_12		0x04C
850Sstevel@tonic-gate #define	T_INT_LEVEL_13		0x04D
860Sstevel@tonic-gate #define	T_INT_LEVEL_14		0x04E
870Sstevel@tonic-gate #define	T_INT_LEVEL_15		0x04F
880Sstevel@tonic-gate #define	T_VECTORED_INT		0x060
890Sstevel@tonic-gate #define	T_PA_WATCHPOINT		0x061
900Sstevel@tonic-gate #define	T_VA_WATCHPOINT		0x062
910Sstevel@tonic-gate #define	T_FAST_INSTR_MMU_MISS	0x064
920Sstevel@tonic-gate #define	T_FAST_DATA_MMU_MISS	0x068
930Sstevel@tonic-gate #define	T_FAST_DATA_MMU_PROT	0x06C
940Sstevel@tonic-gate #define	T_WIN_OVERFLOW		0x080
950Sstevel@tonic-gate #define	T_WIN_UNDERFLOW		0x0C0
960Sstevel@tonic-gate 
970Sstevel@tonic-gate /*
980Sstevel@tonic-gate  * T_TL1 is the bit that is used to compute the trap vector address when the
990Sstevel@tonic-gate  * trap is taken at TL>0.  This flag is for trap_table.s use, not trap.c use.
1000Sstevel@tonic-gate  */
1010Sstevel@tonic-gate #define	T_TL1			0x200
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate /*
1040Sstevel@tonic-gate  * Software trap type values.
1050Sstevel@tonic-gate  */
1060Sstevel@tonic-gate #define	T_SOFTWARE_TRAP		0x100
1070Sstevel@tonic-gate #define	T_ESOFTWARE_TRAP	0x1FF
1080Sstevel@tonic-gate #define	T_OSYSCALL		(T_SOFTWARE_TRAP + ST_OSYSCALL)
1090Sstevel@tonic-gate #define	T_BREAKPOINT		(T_SOFTWARE_TRAP + ST_BREAKPOINT)
1100Sstevel@tonic-gate #define	T_DIV0			(T_SOFTWARE_TRAP + ST_DIV0)
1110Sstevel@tonic-gate #define	T_FLUSH_WINDOWS		(T_SOFTWARE_TRAP + ST_FLUSH_WINDOWS)
1120Sstevel@tonic-gate #define	T_CLEAN_WINDOWS		(T_SOFTWARE_TRAP + ST_CLEAN_WINDOWS)
1130Sstevel@tonic-gate #define	T_RANGE_CHECK		(T_SOFTWARE_TRAP + ST_RANGE_CHECK)
1140Sstevel@tonic-gate #define	T_FIX_ALIGN		(T_SOFTWARE_TRAP + ST_FIX_ALIGN)
1150Sstevel@tonic-gate #define	T_INT_OVERFLOW		(T_SOFTWARE_TRAP + ST_INT_OVERFLOW)
1160Sstevel@tonic-gate #define	T_SYSCALL		(T_SOFTWARE_TRAP + ST_SYSCALL)
1170Sstevel@tonic-gate #define	T_GETCC			(T_SOFTWARE_TRAP + ST_GETCC)
1180Sstevel@tonic-gate #define	T_SETCC			(T_SOFTWARE_TRAP + ST_SETCC)
1190Sstevel@tonic-gate 
1200Sstevel@tonic-gate #define	T_AST			0x200
1210Sstevel@tonic-gate #define	T_FLUSH_PCB		(T_AST + 0x10)
1220Sstevel@tonic-gate #define	T_SYS_RTT_PAGE		(T_AST + 0x20)
1230Sstevel@tonic-gate #define	T_SYS_RTT_ALIGN		(T_AST + 0x30)
1240Sstevel@tonic-gate #define	T_FLUSHW		(T_AST + 0x40)
1250Sstevel@tonic-gate 
1260Sstevel@tonic-gate /* user mode flag added to trap type */
1270Sstevel@tonic-gate #define	T_USER			0x10000
1280Sstevel@tonic-gate 
1290Sstevel@tonic-gate 
1300Sstevel@tonic-gate #ifdef	__cplusplus
1310Sstevel@tonic-gate }
1320Sstevel@tonic-gate #endif
1330Sstevel@tonic-gate 
1340Sstevel@tonic-gate #endif	/* _SYS_MACHTRAP_H */
135