xref: /csrg-svn/sys/tahoe/include/trap.h (revision 49429)
1*49429Sbostic /*-
2*49429Sbostic  * Copyright (c) 1988 The Regents of the University of California.
3*49429Sbostic  * All rights reserved.
434408Skarels  *
5*49429Sbostic  * This code is derived from software contributed to Berkeley by
6*49429Sbostic  * Computer Consoles Inc.
7*49429Sbostic  *
8*49429Sbostic  * %sccs.include.proprietary.c%
9*49429Sbostic  *
10*49429Sbostic  *	@(#)trap.h	7.2 (Berkeley) 05/08/91
1134408Skarels  */
1225684Ssam 
1331830Skarels /*
1431830Skarels  * Trap type values
1531830Skarels  * also known in trap.c for name strings
1631830Skarels  */
1731830Skarels 
1825684Ssam #define	T_RESADFLT	0	/* reserved addressing */
1925684Ssam #define	T_PRIVINFLT	1	/* privileged instruction */
2025684Ssam #define	T_RESOPFLT	2	/* reserved operand */
2125684Ssam #define	T_BPTFLT	3	/* breakpoint instruction */
2225684Ssam #define	T_SYSCALL	5	/* system call (kcall) */
2325684Ssam #define	T_ARITHTRAP	6	/* arithmetic trap */
2425684Ssam #define	T_ASTFLT	7	/* system forced exception */
2525684Ssam #define	T_SEGFLT	8	/* segmentation (limit) fault */
2625684Ssam #define	T_PROTFLT	9	/* protection fault */
2725684Ssam #define	T_TRCTRAP	10	/* trace trap */
2825684Ssam #define	T_PAGEFLT	12	/* page fault */
2925684Ssam #define	T_TABLEFLT	13	/* page table fault */
3025684Ssam #define	T_ALIGNFLT	14	/* alignment fault */
3125684Ssam #define	T_KSPNOTVAL	15	/* kernel stack pointer not valid */
3225684Ssam #define	T_BUSERR	16	/* bus error */
3330176Ssam #define	T_KDBTRAP	17	/* kernel debugger trap */
3431830Skarels 
3531830Skarels /* definitions for <sys/signal.h> */
3631830Skarels #define	    ILL_RESAD_FAULT	T_RESADFLT
3731830Skarels #define	    ILL_PRIVIN_FAULT	T_PRIVINFLT
3831830Skarels #define	    ILL_RESOP_FAULT	T_RESOPFLT
3931830Skarels #define	    ILL_ALIGN_FAULT	T_ALIGNFLT
4031830Skarels 
4131830Skarels /* codes for SIGFPE/ARITHTRAP */
4231830Skarels #define	    FPE_INTOVF_TRAP	0x1	/* integer overflow */
4331830Skarels #define	    FPE_INTDIV_TRAP	0x2	/* integer divide by zero */
4431830Skarels #define	    FPE_FLTDIV_TRAP	0x3	/* floating/decimal divide by zero */
4531830Skarels #define	    FPE_FLTOVF_TRAP	0x4	/* floating overflow */
4631830Skarels #define	    FPE_FLTUND_TRAP	0x5	/* floating underflow */
47