blob: b90cedacbceb10d82a65c0d9f4fe6dcd87363540 [file] [log] [blame]
Wolfgang Denk6cb142f2006-03-12 02:12:27 +01001/*
2 * U-boot - traps.h
3 *
Aubrey Li155fd762007-04-05 18:31:18 +08004 * Copyright (c) 2005-2007 Analog Devices Inc.
Wolfgang Denk6cb142f2006-03-12 02:12:27 +01005 *
6 * This file is based on
7 * linux/include/asm/traps.h
8 * Copyright (C) 1993 Hamish Macdonald
9 * Lineo, Inc Jul 2001 Tony Kou
10 *
11 * See file CREDITS for list of people who contributed to this
12 * project.
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
Aubrey Li155fd762007-04-05 18:31:18 +080026 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
27 * MA 02110-1301 USA
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010028 */
29
30/*
31 */
32
33#ifndef _BLACKFIN_TRAPS_H
34#define _BLACKFIN_TRAPS_H
35
36#ifndef __ASSEMBLY__
37typedef void (*e_vector) (void);
38extern e_vector vectors[];
39#endif
40
41#define VEC_SYS (0)
42#define VEC_EXCPT01 (1)
43#define VEC_EXCPT02 (2)
44#define VEC_EXCPT03 (3)
45#define VEC_EXCPT04 (4)
46#define VEC_EXCPT05 (5)
47#define VEC_EXCPT06 (6)
48#define VEC_EXCPT07 (7)
49#define VEC_EXCPT08 (8)
50#define VEC_EXCPT09 (9)
51#define VEC_EXCPT10 (10)
52#define VEC_EXCPT11 (11)
53#define VEC_EXCPT12 (12)
54#define VEC_EXCPT13 (13)
55#define VEC_EXCPT14 (14)
56#define VEC_EXCPT15 (15)
57#define VEC_STEP (16)
58#define VEC_OVFLOW (17)
59#define VEC_UNDEF_I (33)
60#define VEC_ILGAL_I (34)
61#define VEC_CPLB_VL (35)
62#define VEC_MISALI_D (36)
63#define VEC_UNCOV (37)
64#define VEC_CPLB_M (38)
65#define VEC_CPLB_MHIT (39)
66#define VEC_WATCH (40)
67#define VEC_ISTRU_VL (41)
68#define VEC_MISALI_I (42)
69#define VEC_CPLB_I_VL (43)
70#define VEC_CPLB_I_M (44)
71#define VEC_CPLB_I_MHIT (45)
72#define VEC_ILL_RES (46) /* including unvalid supervisor mode insn */
73
74#define VECOFF(vec) ((vec)<<2)
75
76#ifndef __ASSEMBLY__
77
78/* Status register bits */
79#define PS_T (0x8000)
80#define PS_S (0x0c00) /* Supervisor mode = 0b01 */
81#define PS_D (0x0c00) /* Debug mode = 0b1x */
82#define PS_M (0x1000)
83#define PS_C (0x0001)
84
85#endif
86#endif