Go to the documentation of this file.
7 #ifndef _UAPI_SPARC_TRAPS_H
8 #define _UAPI_SPARC_TRAPS_H
10 #define NUM_SPARC_TRAPS 255
19 #define SPARC_MOV_CONST_L3(const) (0xa6102000 | (const&0xfff))
25 #define SPARC_BRANCH(dest_addr, inst_addr) \
26 (0x10800000 | (((dest_addr-inst_addr)>>2)&0x3fffff))
28 #define SPARC_RD_PSR_L0 (0xa1480000)
29 #define SPARC_RD_WIM_L3 (0xa7500000)
30 #define SPARC_NOP (0x01000000)
34 #define SP_TRAP_TFLT 0x1
35 #define SP_TRAP_II 0x2
36 #define SP_TRAP_PI 0x3
37 #define SP_TRAP_FPD 0x4
38 #define SP_TRAP_WOVF 0x5
39 #define SP_TRAP_WUNF 0x6
40 #define SP_TRAP_MNA 0x7
41 #define SP_TRAP_FPE 0x8
42 #define SP_TRAP_DFLT 0x9
43 #define SP_TRAP_TOF 0xa
44 #define SP_TRAP_WDOG 0xb
45 #define SP_TRAP_IRQ1 0x11
46 #define SP_TRAP_IRQ2 0x12
47 #define SP_TRAP_IRQ3 0x13
48 #define SP_TRAP_IRQ4 0x14
49 #define SP_TRAP_IRQ5 0x15
50 #define SP_TRAP_IRQ6 0x16
51 #define SP_TRAP_IRQ7 0x17
52 #define SP_TRAP_IRQ8 0x18
53 #define SP_TRAP_IRQ9 0x19
54 #define SP_TRAP_IRQ10 0x1a
55 #define SP_TRAP_IRQ11 0x1b
56 #define SP_TRAP_IRQ12 0x1c
57 #define SP_TRAP_IRQ13 0x1d
58 #define SP_TRAP_IRQ14 0x1e
59 #define SP_TRAP_IRQ15 0x1f
60 #define SP_TRAP_RACC 0x20
61 #define SP_TRAP_IACC 0x21
62 #define SP_TRAP_CPDIS 0x24
63 #define SP_TRAP_BADFL 0x25
64 #define SP_TRAP_CPEXP 0x28
65 #define SP_TRAP_DACC 0x29
66 #define SP_TRAP_DIVZ 0x2a
67 #define SP_TRAP_DSTORE 0x2b
68 #define SP_TRAP_DMM 0x2c
69 #define SP_TRAP_IMM 0x3c
72 #define SP_TRAP_SUNOS 0x80
73 #define SP_TRAP_SBPT 0x81
74 #define SP_TRAP_SDIVZ 0x82
75 #define SP_TRAP_FWIN 0x83
76 #define SP_TRAP_CWIN 0x84
77 #define SP_TRAP_RCHK 0x85
78 #define SP_TRAP_FUNA 0x86
79 #define SP_TRAP_IOWFL 0x87
80 #define SP_TRAP_SOLARIS 0x88
81 #define SP_TRAP_NETBSD 0x89
82 #define SP_TRAP_LINUX 0x90
85 #define ST_SYSCALL 0x00
86 #define ST_BREAKPOINT 0x01
88 #define ST_FLUSH_WINDOWS 0x03
89 #define ST_CLEAN_WINDOWS 0x04
90 #define ST_RANGE_CHECK 0x05
91 #define ST_FIX_ALIGN 0x06
92 #define ST_INT_OVERFLOW 0x07
95 #define SP_TRAP_KBPT1 0xfe
96 #define SP_TRAP_KBPT2 0xff
100 #define BAD_TRAP_P(level) \
101 ((level > SP_TRAP_WDOG && level < SP_TRAP_IRQ1) || \
102 (level > SP_TRAP_IACC && level < SP_TRAP_CPDIS) || \
103 (level > SP_TRAP_BADFL && level < SP_TRAP_CPEXP) || \
104 (level > SP_TRAP_DMM && level < SP_TRAP_IMM) || \
105 (level > SP_TRAP_IMM && level < SP_TRAP_SUNOS) || \
106 (level > SP_TRAP_LINUX && level < SP_TRAP_KBPT1))
109 #define HW_TRAP_P(level) ((level > 0) && (level < SP_TRAP_SUNOS))
112 #define SW_TRAP_P(level) ((level >= SP_TRAP_SUNOS) && (level <= SP_TRAP_KBPT2))
115 #define SCALL_TRAP_P(level) ((level == SP_TRAP_SUNOS) || \
116 (level == SP_TRAP_SOLARIS) || \
117 (level == SP_TRAP_NETBSD) || \
118 (level == SP_TRAP_LINUX))