1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 23*0Sstevel@tonic-gate 24*0Sstevel@tonic-gate /* 25*0Sstevel@tonic-gate * Copyright (c) 1985 by Sun Microsystems, Inc. 26*0Sstevel@tonic-gate */ 27*0Sstevel@tonic-gate 28*0Sstevel@tonic-gate #ifndef _sparc_trap_h 29*0Sstevel@tonic-gate #define _sparc_trap_h 30*0Sstevel@tonic-gate 31*0Sstevel@tonic-gate /* 32*0Sstevel@tonic-gate * Trap type values. 33*0Sstevel@tonic-gate */ 34*0Sstevel@tonic-gate #define TT(X) ((X)<<4) 35*0Sstevel@tonic-gate 36*0Sstevel@tonic-gate /* 37*0Sstevel@tonic-gate * The Coprocessor bit. 38*0Sstevel@tonic-gate */ 39*0Sstevel@tonic-gate #define CP_BIT 0x20 40*0Sstevel@tonic-gate 41*0Sstevel@tonic-gate /* 42*0Sstevel@tonic-gate * Hardware traps. 43*0Sstevel@tonic-gate */ 44*0Sstevel@tonic-gate #define T_RESET 0x00 45*0Sstevel@tonic-gate #define T_TEXT_FAULT 0x01 46*0Sstevel@tonic-gate #define T_UNIMP_INSTR 0x02 47*0Sstevel@tonic-gate #define T_PRIV_INSTR 0x03 48*0Sstevel@tonic-gate #define T_FP_DISABLED 0x04 49*0Sstevel@tonic-gate #define T_CP_DISABLED (0x4 | CP_BIT) 50*0Sstevel@tonic-gate #define T_WIN_OVERFLOW 0x05 51*0Sstevel@tonic-gate #define T_WIN_UNDERFLOW 0x06 52*0Sstevel@tonic-gate #define T_ALIGNMENT 0x07 53*0Sstevel@tonic-gate #define T_FP_EXCEPTION 0x08 54*0Sstevel@tonic-gate #define T_CP_EXCEPTION (0x8 | CP_BIT) 55*0Sstevel@tonic-gate #define T_DATA_FAULT 0x09 56*0Sstevel@tonic-gate #define T_TAG_OVERFLOW 0x0A 57*0Sstevel@tonic-gate #define T_INT 0x10 58*0Sstevel@tonic-gate #define T_INT_LEVEL 0x0F 59*0Sstevel@tonic-gate #define T_INT_LEVEL_1 0x11 60*0Sstevel@tonic-gate #define T_INT_LEVEL_2 0x12 61*0Sstevel@tonic-gate #define T_INT_LEVEL_3 0x13 62*0Sstevel@tonic-gate #define T_INT_LEVEL_4 0x14 63*0Sstevel@tonic-gate #define T_INT_LEVEL_5 0x15 64*0Sstevel@tonic-gate #define T_INT_LEVEL_6 0x16 65*0Sstevel@tonic-gate #define T_INT_LEVEL_7 0x17 66*0Sstevel@tonic-gate #define T_INT_LEVEL_8 0x18 67*0Sstevel@tonic-gate #define T_INT_LEVEL_9 0x19 68*0Sstevel@tonic-gate #define T_INT_LEVEL_10 0x1A 69*0Sstevel@tonic-gate #define T_INT_LEVEL_11 0x1B 70*0Sstevel@tonic-gate #define T_INT_LEVEL_12 0x1C 71*0Sstevel@tonic-gate #define T_INT_LEVEL_13 0x1D 72*0Sstevel@tonic-gate #define T_INT_LEVEL_14 0x1E 73*0Sstevel@tonic-gate #define T_INT_LEVEL_15 0x1F 74*0Sstevel@tonic-gate 75*0Sstevel@tonic-gate /* 76*0Sstevel@tonic-gate * Software traps (ticc instructions). 77*0Sstevel@tonic-gate */ 78*0Sstevel@tonic-gate #define ST_SYSCALL 0x00 79*0Sstevel@tonic-gate #define ST_BREAKPOINT 0x01 80*0Sstevel@tonic-gate #define ST_DIV0 0x02 81*0Sstevel@tonic-gate #define ST_FLUSH_WINDOWS 0x03 82*0Sstevel@tonic-gate #define ST_CLEAN_WINDOWS 0x04 83*0Sstevel@tonic-gate #define ST_RANGE_CHECK 0x05 84*0Sstevel@tonic-gate #define ST_FIX_ALIGN 0x06 85*0Sstevel@tonic-gate #define ST_INT_OVERFLOW 0x07 86*0Sstevel@tonic-gate 87*0Sstevel@tonic-gate #define ST_GETCC 0x20 88*0Sstevel@tonic-gate #define ST_SETCC 0x21 89*0Sstevel@tonic-gate #ifdef sun4c 90*0Sstevel@tonic-gate #define ST_MON_BREAKPOINT 0x7F 91*0Sstevel@tonic-gate #endif sun4c 92*0Sstevel@tonic-gate 93*0Sstevel@tonic-gate /* 94*0Sstevel@tonic-gate * Software trap vectors 16 - 31 are reserved for use by the user 95*0Sstevel@tonic-gate * and will not be usurped by Sun. 96*0Sstevel@tonic-gate */ 97*0Sstevel@tonic-gate 98*0Sstevel@tonic-gate /* 99*0Sstevel@tonic-gate * Software trap type values. 100*0Sstevel@tonic-gate */ 101*0Sstevel@tonic-gate #define T_SOFTWARE_TRAP 0x80 102*0Sstevel@tonic-gate #define T_ESOFTWARE_TRAP 0xFF 103*0Sstevel@tonic-gate #define T_SYSCALL (T_SOFTWARE_TRAP + ST_SYSCALL) 104*0Sstevel@tonic-gate #define T_BREAKPOINT (T_SOFTWARE_TRAP + ST_BREAKPOINT) 105*0Sstevel@tonic-gate #define T_DIV0 (T_SOFTWARE_TRAP + ST_DIV0) 106*0Sstevel@tonic-gate #define T_FLUSH_WINDOWS (T_SOFTWARE_TRAP + ST_FLUSH_WINDOWS) 107*0Sstevel@tonic-gate #define T_CLEAN_WINDOWS (T_SOFTWARE_TRAP + ST_CLEAN_WINDOWS) 108*0Sstevel@tonic-gate #define T_RANGE_CHECK (T_SOFTWARE_TRAP + ST_RANGE_CHECK) 109*0Sstevel@tonic-gate #define T_FIX_ALIGN (T_SOFTWARE_TRAP + ST_FIX_ALIGN) 110*0Sstevel@tonic-gate #define T_INT_OVERFLOW (T_SOFTWARE_TRAP + ST_INT_OVERFLOW) 111*0Sstevel@tonic-gate 112*0Sstevel@tonic-gate #define T_GETCC (T_SOFTWARE_TRAP + ST_GETCC) 113*0Sstevel@tonic-gate #define T_SETCC (T_SOFTWARE_TRAP + ST_SETCC) 114*0Sstevel@tonic-gate 115*0Sstevel@tonic-gate /* 116*0Sstevel@tonic-gate * Pseudo traps. 117*0Sstevel@tonic-gate */ 118*0Sstevel@tonic-gate #define T_INTERRUPT 0x100 119*0Sstevel@tonic-gate #define T_SPURIOUS (T_INTERRUPT | T_INT) 120*0Sstevel@tonic-gate #define T_FAULT 0x200 121*0Sstevel@tonic-gate #define T_AST 0x400 122*0Sstevel@tonic-gate #define T_ZERO 0x00 123*0Sstevel@tonic-gate 124*0Sstevel@tonic-gate #endif /*!_sparc_trap_h*/ 125