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 /* 23*722Smuffin * Copyright 1985 Sun Microsystems, Inc. All rights reserved. 24*722Smuffin * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _sparc_trap_h 28*722Smuffin #define _sparc_trap_h 29*722Smuffin 30*722Smuffin #pragma ident "%Z%%M% %I% %E% SMI" 310Sstevel@tonic-gate 320Sstevel@tonic-gate /* 330Sstevel@tonic-gate * Trap type values. 340Sstevel@tonic-gate */ 350Sstevel@tonic-gate #define TT(X) ((X)<<4) 360Sstevel@tonic-gate 370Sstevel@tonic-gate /* 380Sstevel@tonic-gate * The Coprocessor bit. 390Sstevel@tonic-gate */ 400Sstevel@tonic-gate #define CP_BIT 0x20 410Sstevel@tonic-gate 420Sstevel@tonic-gate /* 430Sstevel@tonic-gate * Hardware traps. 440Sstevel@tonic-gate */ 450Sstevel@tonic-gate #define T_RESET 0x00 460Sstevel@tonic-gate #define T_TEXT_FAULT 0x01 470Sstevel@tonic-gate #define T_UNIMP_INSTR 0x02 480Sstevel@tonic-gate #define T_PRIV_INSTR 0x03 490Sstevel@tonic-gate #define T_FP_DISABLED 0x04 500Sstevel@tonic-gate #define T_CP_DISABLED (0x4 | CP_BIT) 510Sstevel@tonic-gate #define T_WIN_OVERFLOW 0x05 520Sstevel@tonic-gate #define T_WIN_UNDERFLOW 0x06 530Sstevel@tonic-gate #define T_ALIGNMENT 0x07 540Sstevel@tonic-gate #define T_FP_EXCEPTION 0x08 550Sstevel@tonic-gate #define T_CP_EXCEPTION (0x8 | CP_BIT) 560Sstevel@tonic-gate #define T_DATA_FAULT 0x09 570Sstevel@tonic-gate #define T_TAG_OVERFLOW 0x0A 580Sstevel@tonic-gate #define T_INT 0x10 590Sstevel@tonic-gate #define T_INT_LEVEL 0x0F 600Sstevel@tonic-gate #define T_INT_LEVEL_1 0x11 610Sstevel@tonic-gate #define T_INT_LEVEL_2 0x12 620Sstevel@tonic-gate #define T_INT_LEVEL_3 0x13 630Sstevel@tonic-gate #define T_INT_LEVEL_4 0x14 640Sstevel@tonic-gate #define T_INT_LEVEL_5 0x15 650Sstevel@tonic-gate #define T_INT_LEVEL_6 0x16 660Sstevel@tonic-gate #define T_INT_LEVEL_7 0x17 670Sstevel@tonic-gate #define T_INT_LEVEL_8 0x18 680Sstevel@tonic-gate #define T_INT_LEVEL_9 0x19 690Sstevel@tonic-gate #define T_INT_LEVEL_10 0x1A 700Sstevel@tonic-gate #define T_INT_LEVEL_11 0x1B 710Sstevel@tonic-gate #define T_INT_LEVEL_12 0x1C 720Sstevel@tonic-gate #define T_INT_LEVEL_13 0x1D 730Sstevel@tonic-gate #define T_INT_LEVEL_14 0x1E 740Sstevel@tonic-gate #define T_INT_LEVEL_15 0x1F 750Sstevel@tonic-gate 760Sstevel@tonic-gate /* 770Sstevel@tonic-gate * Software traps (ticc instructions). 780Sstevel@tonic-gate */ 790Sstevel@tonic-gate #define ST_SYSCALL 0x00 800Sstevel@tonic-gate #define ST_BREAKPOINT 0x01 810Sstevel@tonic-gate #define ST_DIV0 0x02 820Sstevel@tonic-gate #define ST_FLUSH_WINDOWS 0x03 830Sstevel@tonic-gate #define ST_CLEAN_WINDOWS 0x04 840Sstevel@tonic-gate #define ST_RANGE_CHECK 0x05 850Sstevel@tonic-gate #define ST_FIX_ALIGN 0x06 860Sstevel@tonic-gate #define ST_INT_OVERFLOW 0x07 870Sstevel@tonic-gate 880Sstevel@tonic-gate #define ST_GETCC 0x20 890Sstevel@tonic-gate #define ST_SETCC 0x21 900Sstevel@tonic-gate #define ST_MON_BREAKPOINT 0x7F 910Sstevel@tonic-gate 920Sstevel@tonic-gate /* 930Sstevel@tonic-gate * Software trap vectors 16 - 31 are reserved for use by the user 940Sstevel@tonic-gate * and will not be usurped by Sun. 950Sstevel@tonic-gate */ 960Sstevel@tonic-gate 970Sstevel@tonic-gate /* 980Sstevel@tonic-gate * Software trap type values. 990Sstevel@tonic-gate */ 1000Sstevel@tonic-gate #define T_SOFTWARE_TRAP 0x80 1010Sstevel@tonic-gate #define T_ESOFTWARE_TRAP 0xFF 1020Sstevel@tonic-gate #define T_SYSCALL (T_SOFTWARE_TRAP + ST_SYSCALL) 1030Sstevel@tonic-gate #define T_BREAKPOINT (T_SOFTWARE_TRAP + ST_BREAKPOINT) 1040Sstevel@tonic-gate #define T_DIV0 (T_SOFTWARE_TRAP + ST_DIV0) 1050Sstevel@tonic-gate #define T_FLUSH_WINDOWS (T_SOFTWARE_TRAP + ST_FLUSH_WINDOWS) 1060Sstevel@tonic-gate #define T_CLEAN_WINDOWS (T_SOFTWARE_TRAP + ST_CLEAN_WINDOWS) 1070Sstevel@tonic-gate #define T_RANGE_CHECK (T_SOFTWARE_TRAP + ST_RANGE_CHECK) 1080Sstevel@tonic-gate #define T_FIX_ALIGN (T_SOFTWARE_TRAP + ST_FIX_ALIGN) 1090Sstevel@tonic-gate #define T_INT_OVERFLOW (T_SOFTWARE_TRAP + ST_INT_OVERFLOW) 1100Sstevel@tonic-gate 1110Sstevel@tonic-gate #define T_GETCC (T_SOFTWARE_TRAP + ST_GETCC) 1120Sstevel@tonic-gate #define T_SETCC (T_SOFTWARE_TRAP + ST_SETCC) 1130Sstevel@tonic-gate 1140Sstevel@tonic-gate /* 1150Sstevel@tonic-gate * Pseudo traps. 1160Sstevel@tonic-gate */ 1170Sstevel@tonic-gate #define T_INTERRUPT 0x100 1180Sstevel@tonic-gate #define T_SPURIOUS (T_INTERRUPT | T_INT) 1190Sstevel@tonic-gate #define T_FAULT 0x200 1200Sstevel@tonic-gate #define T_AST 0x400 1210Sstevel@tonic-gate #define T_ZERO 0x00 1220Sstevel@tonic-gate 123*722Smuffin #endif /* !_sparc_trap_h */ 124