2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _SYS_MACHTRAP_H
2N/A#define _SYS_MACHTRAP_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * This file is machine specific as is.
2N/A * Some trap types could be made common
2N/A * for all sparcs, but that is a project
2N/A * in and of itself.
2N/A */
2N/A
2N/A/*
2N/A * Hardware traps.
2N/A */
2N/A#define T_POR 0x001
2N/A#define T_WDR 0x002
2N/A#define T_XIR 0x003
2N/A#define T_SIR 0x004
2N/A#define T_RED_EXCEPTION 0x005
2N/A#define T_INSTR_EXCEPTION 0x008
2N/A#define T_INSTR_MMU_MISS 0x009
2N/A#define T_INSTR_ERROR 0x00A
2N/A#define T_UNIMP_INSTR 0x010
2N/A#define T_PRIV_INSTR 0x011
2N/A#define T_UNIMP_LDD 0x012
2N/A#define T_UNIMP_STD 0x013
2N/A#define T_FP_DISABLED 0x020
2N/A#define T_FP_EXCEPTION_IEEE 0x021
2N/A#define T_FP_EXCEPTION_OTHER 0x022
2N/A#define T_TAG_OVERFLOW 0x023
2N/A#define T_CLEAN_WINDOW 0x024
2N/A#define T_IDIV0 0x028
2N/A#define T_DATA_EXCEPTION 0x030
2N/A#define T_DATA_MMU_MISS 0x031
2N/A#define T_DATA_ERROR 0x032
2N/A#define T_DATA_PROT 0x033
2N/A#define T_ALIGNMENT 0x034
2N/A#define T_LDDF_ALIGN 0x035
2N/A#define T_STDF_ALIGN 0x036
2N/A#define T_PRIV_ACTION 0x037
2N/A#define T_ASYNC_ERROR 0x040
2N/A#define T_INT_LEVEL_1 0x041
2N/A#define T_INT_LEVEL_2 0x042
2N/A#define T_INT_LEVEL_3 0x043
2N/A#define T_INT_LEVEL_4 0x044
2N/A#define T_INT_LEVEL_5 0x045
2N/A#define T_INT_LEVEL_6 0x046
2N/A#define T_INT_LEVEL_7 0x047
2N/A#define T_INT_LEVEL_8 0x048
2N/A#define T_INT_LEVEL_9 0x049
2N/A#define T_INT_LEVEL_10 0x04A
2N/A#define T_INT_LEVEL_11 0x04B
2N/A#define T_INT_LEVEL_12 0x04C
2N/A#define T_INT_LEVEL_13 0x04D
2N/A#define T_INT_LEVEL_14 0x04E
2N/A#define T_INT_LEVEL_15 0x04F
2N/A#define T_VECTORED_INT 0x060
2N/A#define T_PA_WATCHPOINT 0x061
2N/A#define T_VA_WATCHPOINT 0x062
2N/A#define T_FAST_INSTR_MMU_MISS 0x064
2N/A#define T_FAST_DATA_MMU_MISS 0x068
2N/A#define T_FAST_DATA_MMU_PROT 0x06C
2N/A#define T_WIN_OVERFLOW 0x080
2N/A#define T_WIN_UNDERFLOW 0x0C0
2N/A
2N/A/*
2N/A * T_TL1 is the bit that is used to compute the trap vector address when the
2N/A * trap is taken at TL>0. This flag is for trap_table.s use, not trap.c use.
2N/A */
2N/A#define T_TL1 0x200
2N/A
2N/A/*
2N/A * Software trap type values.
2N/A */
2N/A#define T_SOFTWARE_TRAP 0x100
2N/A#define T_ESOFTWARE_TRAP 0x1FF
2N/A#define T_OSYSCALL (T_SOFTWARE_TRAP + ST_OSYSCALL)
2N/A#define T_BREAKPOINT (T_SOFTWARE_TRAP + ST_BREAKPOINT)
2N/A#define T_DIV0 (T_SOFTWARE_TRAP + ST_DIV0)
2N/A#define T_FLUSH_WINDOWS (T_SOFTWARE_TRAP + ST_FLUSH_WINDOWS)
2N/A#define T_CLEAN_WINDOWS (T_SOFTWARE_TRAP + ST_CLEAN_WINDOWS)
2N/A#define T_RANGE_CHECK (T_SOFTWARE_TRAP + ST_RANGE_CHECK)
2N/A#define T_FIX_ALIGN (T_SOFTWARE_TRAP + ST_FIX_ALIGN)
2N/A#define T_INT_OVERFLOW (T_SOFTWARE_TRAP + ST_INT_OVERFLOW)
2N/A#define T_SYSCALL (T_SOFTWARE_TRAP + ST_SYSCALL)
2N/A#define T_GETCC (T_SOFTWARE_TRAP + ST_GETCC)
2N/A#define T_SETCC (T_SOFTWARE_TRAP + ST_SETCC)
2N/A
2N/A#define T_AST 0x200
2N/A#define T_FLUSH_PCB (T_AST + 0x10)
2N/A#define T_SYS_RTT_PAGE (T_AST + 0x20)
2N/A#define T_SYS_RTT_ALIGN (T_AST + 0x30)
2N/A#define T_FLUSHW (T_AST + 0x40)
2N/A
2N/A/* user mode flag added to trap type */
2N/A#define T_USER 0x10000
2N/A
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _SYS_MACHTRAP_H */
2N/A