utrap.h revision 88664
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/sparc64/include/utrap.h 88664 2001-12-29 08:59:33Z jake $
27 */
28
29#ifndef	_MACHINE_UTRAP_H_
30#define	_MACHINE_UTRAP_H_
31
32#define	UT_INSTRUCTION_EXCEPTION	1
33#define	UT_INSTRUCTION_ERROR		2
34#define	UT_INSTRUCTION_PROTECTION	3
35#define	UT_ILLTRAP_INSTRUCTION		4
36#define	UT_ILLEGAL_INSTRUCTION		5
37#define	UT_PRIVILEGED_OPCODE		6
38#define	UT_FP_DISABLED			7
39#define	UT_FP_EXCEPTION_IEEE_754	8
40#define	UT_FP_EXCEPTION_OTHER		9
41#define	UT_TAG_OFERFLOW			10
42#define	UT_DIVISION_BY_ZERO		11
43#define	UT_DATA_EXCEPTION		12
44#define	UT_DATA_ERROR			13
45#define	UT_DATA_PROTECTION		14
46#define	UT_MEM_ADDRESS_NOT_ALIGNED	15
47#define	UT_PRIVILEGED_ACTION		16
48#define	UT_ASYNC_DATA_ERROR		17
49#define	UT_TRAP_INSTRUCTION_16		18
50#define	UT_TRAP_INSTRUCTION_17		19
51#define	UT_TRAP_INSTRUCTION_18		20
52#define	UT_TRAP_INSTRUCTION_19		21
53#define	UT_TRAP_INSTRUCTION_20		22
54#define	UT_TRAP_INSTRUCTION_21		23
55#define	UT_TRAP_INSTRUCTION_22		24
56#define	UT_TRAP_INSTRUCTION_23		25
57#define	UT_TRAP_INSTRUCTION_24		26
58#define	UT_TRAP_INSTRUCTION_25		27
59#define	UT_TRAP_INSTRUCTION_26		28
60#define	UT_TRAP_INSTRUCTION_27		29
61#define	UT_TRAP_INSTRUCTION_28		30
62#define	UT_TRAP_INSTRUCTION_29		31
63#define	UT_TRAP_INSTRUCTION_30		32
64#define	UT_TRAP_INSTRUCTION_31		33
65#define	UT_MAX				34
66
67#define	ST_BREAKPOINT			1
68#define	ST_DIVISION_BY_ZERO		2
69#define	ST_CLEAN_WINDOW			4
70#define	ST_RANGE_CHECK			5
71#define	ST_FIX_ALIGNMENT		6
72#define	ST_INTEGER_OVERFLOW		7
73#define	ST_SYSCALL			9
74
75#define	UTH_NOCHANGE			(-1)
76
77#if 0
78
79typedef	int utrap_entry_t;
80typedef void *utrap_handler_t;
81
82#endif
83
84#endif
85