2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2001 Jake Burkholder.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 #ifndef _MACHINE_TRAP_H_
32 #define _MACHINE_TRAP_H_
37 #define T_INSTRUCTION_EXCEPTION 1
38 #define T_INSTRUCTION_ERROR 2
39 #define T_INSTRUCTION_PROTECTION 3
40 #define T_ILLTRAP_INSTRUCTION 4
41 #define T_ILLEGAL_INSTRUCTION 5
42 #define T_PRIVILEGED_OPCODE 6
43 #define T_FP_DISABLED 7
44 #define T_FP_EXCEPTION_IEEE_754 8
45 #define T_FP_EXCEPTION_OTHER 9
46 #define T_TAG_OVERFLOW 10
47 #define T_DIVISION_BY_ZERO 11
48 #define T_DATA_EXCEPTION 12
49 #define T_DATA_ERROR 13
50 #define T_DATA_PROTECTION 14
51 #define T_MEM_ADDRESS_NOT_ALIGNED 15
52 #define T_PRIVILEGED_ACTION 16
53 #define T_ASYNC_DATA_ERROR 17
54 #define T_TRAP_INSTRUCTION_16 18
55 #define T_TRAP_INSTRUCTION_17 19
56 #define T_TRAP_INSTRUCTION_18 20
57 #define T_TRAP_INSTRUCTION_19 21
58 #define T_TRAP_INSTRUCTION_20 22
59 #define T_TRAP_INSTRUCTION_21 23
60 #define T_TRAP_INSTRUCTION_22 24
61 #define T_TRAP_INSTRUCTION_23 25
62 #define T_TRAP_INSTRUCTION_24 26
63 #define T_TRAP_INSTRUCTION_25 27
64 #define T_TRAP_INSTRUCTION_26 28
65 #define T_TRAP_INSTRUCTION_27 29
66 #define T_TRAP_INSTRUCTION_28 30
67 #define T_TRAP_INSTRUCTION_29 31
68 #define T_TRAP_INSTRUCTION_30 32
69 #define T_TRAP_INSTRUCTION_31 33
70 #define T_INSTRUCTION_MISS 34
71 #define T_DATA_MISS 35
73 #define T_INTERRUPT 36
74 #define T_PA_WATCHPOINT 37
75 #define T_VA_WATCHPOINT 38
76 #define T_CORRECTED_ECC_ERROR 39
80 #define T_BREAKPOINT 43
81 #define T_CLEAN_WINDOW 44
82 #define T_RANGE_CHECK 45
83 #define T_FIX_ALIGNMENT 46
84 #define T_INTEGER_OVERFLOW 47
86 #define T_RSTRWP_PHYS 49
87 #define T_RSTRWP_VIRT 50
88 #define T_KSTACK_FAULT 51
90 #define T_MAX (T_KSTACK_FAULT + 1)
95 void sun4u_set_traptable(void *tba_addr);
96 extern const char *const trap_msg[];
101 #endif /* !_MACHINE_TRAP_H_ */