]>
Commit | Line | Data |
---|---|---|
4a551709 WD |
1 | /* |
2 | * (C) Copyright 2003, Psyent Corporation <www.psyent.com> | |
3 | * Scott McNutt <smcnutt@psyent.com> | |
ec4c544b | 4 | * Stephan Linz <linz@li-pro.net> |
4a551709 WD |
5 | * |
6 | * See file CREDITS for list of people who contributed to this | |
7 | * project. | |
8 | * | |
9 | * This program is free software; you can redistribute it and/or | |
10 | * modify it under the terms of the GNU General Public License as | |
11 | * published by the Free Software Foundation; either version 2 of | |
12 | * the License, or (at your option) any later version. | |
13 | * | |
14 | * This program is distributed in the hope that it will be useful, | |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | * GNU General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with this program; if not, write to the Free Software | |
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | * MA 02111-1307 USA | |
23 | */ | |
24 | ||
ec4c544b WD |
25 | #include <config.h> |
26 | ||
4a551709 WD |
27 | |
28 | /************************************************************************* | |
29 | * Exception Vector Table | |
30 | * | |
31 | * This could have gone in the cpu soure tree, but the whole point of | |
32 | * Nios is customization -- and polluting the cpu source tree with | |
33 | * board-specific ifdef's really defeats the purpose, no? With this in | |
34 | * the board-specific tree, each board has the freedom to organize | |
35 | * vectors/traps, etc anyway it wants. The init code copies this table | |
36 | * to the proper location. | |
37 | * | |
38 | * Each board can do what it likes here. But there are four "standard" | |
39 | * handlers availble: | |
40 | * | |
41 | * _cwp_lolimit -Handles register window underflows. | |
42 | * _cwp_hilimit -Handles register window overflows. | |
43 | * _timebase_int -Increments the timebase. | |
44 | * _def_xhandler -Default exception handler. | |
45 | * | |
46 | * _timebase_int handles a Nios Timer interrupt and increments the | |
47 | * timestamp used for the get_timer(), reset_timer(), etc. routines. It | |
48 | * expects the timer to be configured like the standard-32 low priority | |
49 | * timer. | |
50 | * | |
51 | * _def_xhandler dispatches exceptions/traps via the external_interrupt() | |
52 | * routine. This lets you use the irq_install_handler() and handle your | |
53 | * interrupts/traps with code written in C. | |
54 | ************************************************************************/ | |
55 | ||
56 | .data | |
57 | .global _vectors | |
58 | .align 4 | |
59 | _vectors: | |
60 | ||
6d0f6bcf | 61 | #if defined(CONFIG_SYS_NIOS_CPU_OCI_BASE) |
ec4c544b WD |
62 | /* OCI does the reset job */ |
63 | .long _def_xhandler@h /* Vector 0 - NMI / Reset */ | |
64 | #else | |
65 | /* there is no OCI, so we have to do a direct reset jump here */ | |
6d0f6bcf | 66 | .long CONFIG_SYS_NIOS_CPU_RST_VECT /* Vector 0 - Reset to GERMS */ |
ec4c544b WD |
67 | #endif |
68 | .long _cwp_lolimit@h /* Vector 1 - underflow */ | |
4a551709 WD |
69 | .long _cwp_hilimit@h /* Vector 2 - overflow */ |
70 | ||
71 | .long _def_xhandler@h /* Vector 3 - GNUPro debug */ | |
72 | .long _def_xhandler@h /* Vector 4 - GNUPro debug */ | |
73 | .long _def_xhandler@h /* Vector 5 - GNUPro debug */ | |
74 | .long _def_xhandler@h /* Vector 6 - future reserved */ | |
75 | .long _def_xhandler@h /* Vector 7 - future reserved */ | |
76 | .long _def_xhandler@h /* Vector 8 - future reserved */ | |
77 | .long _def_xhandler@h /* Vector 9 - future reserved */ | |
78 | .long _def_xhandler@h /* Vector 10 - future reserved */ | |
79 | .long _def_xhandler@h /* Vector 11 - future reserved */ | |
80 | .long _def_xhandler@h /* Vector 12 - future reserved */ | |
81 | .long _def_xhandler@h /* Vector 13 - future reserved */ | |
82 | .long _def_xhandler@h /* Vector 14 - future reserved */ | |
83 | .long _def_xhandler@h /* Vector 15 - future reserved */ | |
6d0f6bcf | 84 | #if (CONFIG_SYS_NIOS_TMRIRQ == 16) |
ec4c544b WD |
85 | .long _timebase_int@h /* Vector 16 - lopri timer*/ |
86 | #else | |
4a551709 | 87 | .long _def_xhandler@h /* Vector 16 */ |
ec4c544b | 88 | #endif |
4a551709 WD |
89 | .long _def_xhandler@h /* Vector 17 */ |
90 | .long _def_xhandler@h /* Vector 18 */ | |
91 | .long _def_xhandler@h /* Vector 19 */ | |
92 | .long _def_xhandler@h /* Vector 20 */ | |
93 | .long _def_xhandler@h /* Vector 21 */ | |
94 | .long _def_xhandler@h /* Vector 22 */ | |
95 | .long _def_xhandler@h /* Vector 23 */ | |
96 | .long _def_xhandler@h /* Vector 24 */ | |
97 | .long _def_xhandler@h /* Vector 25 */ | |
98 | .long _def_xhandler@h /* Vector 26 */ | |
99 | .long _def_xhandler@h /* Vector 27 */ | |
100 | .long _def_xhandler@h /* Vector 28 */ | |
101 | .long _def_xhandler@h /* Vector 29 */ | |
102 | .long _def_xhandler@h /* Vector 30 */ | |
103 | .long _def_xhandler@h /* Vector 31 */ | |
104 | .long _def_xhandler@h /* Vector 32 */ | |
105 | .long _def_xhandler@h /* Vector 33 */ | |
106 | .long _def_xhandler@h /* Vector 34 */ | |
107 | .long _def_xhandler@h /* Vector 35 */ | |
108 | .long _def_xhandler@h /* Vector 36 */ | |
109 | .long _def_xhandler@h /* Vector 37 */ | |
110 | .long _def_xhandler@h /* Vector 38 */ | |
111 | .long _def_xhandler@h /* Vector 39 */ | |
112 | .long _def_xhandler@h /* Vector 40 */ | |
113 | .long _def_xhandler@h /* Vector 41 */ | |
114 | .long _def_xhandler@h /* Vector 42 */ | |
115 | .long _def_xhandler@h /* Vector 43 */ | |
116 | .long _def_xhandler@h /* Vector 44 */ | |
117 | .long _def_xhandler@h /* Vector 45 */ | |
118 | .long _def_xhandler@h /* Vector 46 */ | |
119 | .long _def_xhandler@h /* Vector 47 */ | |
120 | .long _def_xhandler@h /* Vector 48 */ | |
121 | .long _def_xhandler@h /* Vector 49 */ | |
6d0f6bcf | 122 | #if (CONFIG_SYS_NIOS_TMRIRQ == 50) |
4a551709 | 123 | .long _timebase_int@h /* Vector 50 - lopri timer*/ |
ec4c544b WD |
124 | #else |
125 | .long _def_xhandler@h /* Vector 50 */ | |
126 | #endif | |
4a551709 WD |
127 | .long _def_xhandler@h /* Vector 51 */ |
128 | .long _def_xhandler@h /* Vector 52 */ | |
129 | .long _def_xhandler@h /* Vector 53 */ | |
130 | .long _def_xhandler@h /* Vector 54 */ | |
131 | .long _def_xhandler@h /* Vector 55 */ | |
132 | .long _def_xhandler@h /* Vector 56 */ | |
133 | .long _def_xhandler@h /* Vector 57 */ | |
134 | .long _def_xhandler@h /* Vector 58 */ | |
135 | .long _def_xhandler@h /* Vector 59 */ | |
136 | .long _def_xhandler@h /* Vector 60 */ | |
137 | .long _def_xhandler@h /* Vector 61 */ | |
138 | .long _def_xhandler@h /* Vector 62 */ | |
139 | .long _def_xhandler@h /* Vector 63 */ |