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, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_MACHTRAP_H 28 #define _SYS_MACHTRAP_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 /* 37 * This file is machine specific as is. 38 * Some trap types could be made common 39 * for all sparcs, but that is a project 40 * in and of itself. 41 */ 42 43 /* 44 * Hardware traps. 45 */ 46 #define T_POR 0x001 47 #define T_WDR 0x002 48 #define T_XIR 0x003 49 #define T_SIR 0x004 50 #define T_RED_EXCEPTION 0x005 51 #define T_INSTR_EXCEPTION 0x008 52 #define T_INSTR_MMU_MISS 0x009 53 #define T_INSTR_ERROR 0x00A 54 #define T_UNIMP_INSTR 0x010 55 #define T_PRIV_INSTR 0x011 56 #define T_FP_DISABLED 0x020 57 #define T_FP_EXCEPTION_IEEE 0x021 58 #define T_FP_EXCEPTION_OTHER 0x022 59 #define T_TAG_OVERFLOW 0x023 60 #define T_CLEAN_WINDOW 0x024 61 #define T_IDIV0 0x028 62 #define T_DATA_EXCEPTION 0x030 63 #define T_DATA_MMU_MISS 0x031 64 #define T_DATA_ERROR 0x032 65 #define T_DATA_PROT 0x033 66 #define T_ALIGNMENT 0x034 67 #define T_LDDF_ALIGN 0x035 68 #define T_STDF_ALIGN 0x036 69 #define T_PRIV_ACTION 0x037 70 #define T_ASYNC_ERROR 0x040 71 #define T_INT_LEVEL_1 0x041 72 #define T_INT_LEVEL_2 0x042 73 #define T_INT_LEVEL_3 0x043 74 #define T_INT_LEVEL_4 0x044 75 #define T_INT_LEVEL_5 0x045 76 #define T_INT_LEVEL_6 0x046 77 #define T_INT_LEVEL_7 0x047 78 #define T_INT_LEVEL_8 0x048 79 #define T_INT_LEVEL_9 0x049 80 #define T_INT_LEVEL_10 0x04A 81 #define T_INT_LEVEL_11 0x04B 82 #define T_INT_LEVEL_12 0x04C 83 #define T_INT_LEVEL_13 0x04D 84 #define T_INT_LEVEL_14 0x04E 85 #define T_INT_LEVEL_15 0x04F 86 #define T_VECTORED_INT 0x060 87 #define T_PA_WATCHPOINT 0x061 88 #define T_VA_WATCHPOINT 0x062 89 #define T_FAST_INSTR_MMU_MISS 0x064 90 #define T_FAST_DATA_MMU_MISS 0x068 91 #define T_FAST_DATA_MMU_PROT 0x06C 92 #define T_WIN_OVERFLOW 0x080 93 #define T_WIN_UNDERFLOW 0x0C0 94 95 /* 96 * T_TL1 is the bit that is used to compute the trap vector address when the 97 * trap is taken at TL>0. This flag is for trap_table.s use, not trap.c use. 98 */ 99 #define T_TL1 0x200 100 101 /* 102 * Software trap type values. 103 */ 104 #define T_SOFTWARE_TRAP 0x100 105 #define T_ESOFTWARE_TRAP 0x1FF 106 #define T_OSYSCALL (T_SOFTWARE_TRAP + ST_OSYSCALL) 107 #define T_BREAKPOINT (T_SOFTWARE_TRAP + ST_BREAKPOINT) 108 #define T_DIV0 (T_SOFTWARE_TRAP + ST_DIV0) 109 #define T_FLUSH_WINDOWS (T_SOFTWARE_TRAP + ST_FLUSH_WINDOWS) 110 #define T_CLEAN_WINDOWS (T_SOFTWARE_TRAP + ST_CLEAN_WINDOWS) 111 #define T_RANGE_CHECK (T_SOFTWARE_TRAP + ST_RANGE_CHECK) 112 #define T_FIX_ALIGN (T_SOFTWARE_TRAP + ST_FIX_ALIGN) 113 #define T_INT_OVERFLOW (T_SOFTWARE_TRAP + ST_INT_OVERFLOW) 114 #define T_SYSCALL (T_SOFTWARE_TRAP + ST_SYSCALL) 115 #define T_GETCC (T_SOFTWARE_TRAP + ST_GETCC) 116 #define T_SETCC (T_SOFTWARE_TRAP + ST_SETCC) 117 118 #define T_AST 0x200 119 #define T_FLUSH_PCB (T_AST + 0x10) 120 #define T_SYS_RTT_PAGE (T_AST + 0x20) 121 #define T_SYS_RTT_ALIGN (T_AST + 0x30) 122 #define T_FLUSHW (T_AST + 0x40) 123 124 /* user mode flag added to trap type */ 125 #define T_USER 0x10000 126 127 128 #ifdef __cplusplus 129 } 130 #endif 131 132 #endif /* _SYS_MACHTRAP_H */ 133