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