vectors.S 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /*
  2. * (C) Copyright 2003, Psyent Corporation <www.psyent.com>
  3. * Scott McNutt <smcnutt@psyent.com>
  4. * Stephan Linz <linz@li-pro.net>
  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. #include <config.h>
  25. /*************************************************************************
  26. * Exception Vector Table
  27. *
  28. * This could have gone in the cpu soure tree, but the whole point of
  29. * Nios is customization -- and polluting the cpu source tree with
  30. * board-specific ifdef's really defeats the purpose, no? With this in
  31. * the board-specific tree, each board has the freedom to organize
  32. * vectors/traps, etc anyway it wants. The init code copies this table
  33. * to the proper location.
  34. *
  35. * Each board can do what it likes here. But there are four "standard"
  36. * handlers availble:
  37. *
  38. * _cwp_lolimit -Handles register window underflows.
  39. * _cwp_hilimit -Handles register window overflows.
  40. * _timebase_int -Increments the timebase.
  41. * _def_xhandler -Default exception handler.
  42. *
  43. * _timebase_int handles a Nios Timer interrupt and increments the
  44. * timestamp used for the get_timer(), reset_timer(), etc. routines. It
  45. * expects the timer to be configured like the standard-32 low priority
  46. * timer.
  47. *
  48. * _def_xhandler dispatches exceptions/traps via the external_interrupt()
  49. * routine. This lets you use the irq_install_handler() and handle your
  50. * interrupts/traps with code written in C.
  51. ************************************************************************/
  52. .data
  53. .global _vectors
  54. .align 4
  55. _vectors:
  56. #if defined(CONFIG_SYS_NIOS_CPU_OCI_BASE)
  57. /* OCI does the reset job */
  58. .long _def_xhandler@h /* Vector 0 - NMI / Reset */
  59. #else
  60. /* there is no OCI, so we have to do a direct reset jump here */
  61. .long CONFIG_SYS_NIOS_CPU_RST_VECT /* Vector 0 - Reset to GERMS */
  62. #endif
  63. .long _cwp_lolimit@h /* Vector 1 - underflow */
  64. .long _cwp_hilimit@h /* Vector 2 - overflow */
  65. .long _def_xhandler@h /* Vector 3 - GNUPro debug */
  66. .long _def_xhandler@h /* Vector 4 - GNUPro debug */
  67. .long _def_xhandler@h /* Vector 5 - GNUPro debug */
  68. .long _def_xhandler@h /* Vector 6 - future reserved */
  69. .long _def_xhandler@h /* Vector 7 - future reserved */
  70. .long _def_xhandler@h /* Vector 8 - future reserved */
  71. .long _def_xhandler@h /* Vector 9 - future reserved */
  72. .long _def_xhandler@h /* Vector 10 - future reserved */
  73. .long _def_xhandler@h /* Vector 11 - future reserved */
  74. .long _def_xhandler@h /* Vector 12 - future reserved */
  75. .long _def_xhandler@h /* Vector 13 - future reserved */
  76. .long _def_xhandler@h /* Vector 14 - future reserved */
  77. .long _def_xhandler@h /* Vector 15 - future reserved */
  78. #if (CONFIG_SYS_NIOS_TMRIRQ == 16)
  79. .long _timebase_int@h /* Vector 16 - lopri timer*/
  80. #else
  81. .long _def_xhandler@h /* Vector 16 */
  82. #endif
  83. .long _def_xhandler@h /* Vector 17 */
  84. .long _def_xhandler@h /* Vector 18 */
  85. .long _def_xhandler@h /* Vector 19 */
  86. .long _def_xhandler@h /* Vector 20 */
  87. .long _def_xhandler@h /* Vector 21 */
  88. .long _def_xhandler@h /* Vector 22 */
  89. .long _def_xhandler@h /* Vector 23 */
  90. .long _def_xhandler@h /* Vector 24 */
  91. .long _def_xhandler@h /* Vector 25 */
  92. .long _def_xhandler@h /* Vector 26 */
  93. .long _def_xhandler@h /* Vector 27 */
  94. .long _def_xhandler@h /* Vector 28 */
  95. .long _def_xhandler@h /* Vector 29 */
  96. .long _def_xhandler@h /* Vector 30 */
  97. .long _def_xhandler@h /* Vector 31 */
  98. .long _def_xhandler@h /* Vector 32 */
  99. .long _def_xhandler@h /* Vector 33 */
  100. .long _def_xhandler@h /* Vector 34 */
  101. .long _def_xhandler@h /* Vector 35 */
  102. .long _def_xhandler@h /* Vector 36 */
  103. .long _def_xhandler@h /* Vector 37 */
  104. .long _def_xhandler@h /* Vector 38 */
  105. .long _def_xhandler@h /* Vector 39 */
  106. .long _def_xhandler@h /* Vector 40 */
  107. .long _def_xhandler@h /* Vector 41 */
  108. .long _def_xhandler@h /* Vector 42 */
  109. .long _def_xhandler@h /* Vector 43 */
  110. .long _def_xhandler@h /* Vector 44 */
  111. .long _def_xhandler@h /* Vector 45 */
  112. .long _def_xhandler@h /* Vector 46 */
  113. .long _def_xhandler@h /* Vector 47 */
  114. .long _def_xhandler@h /* Vector 48 */
  115. .long _def_xhandler@h /* Vector 49 */
  116. #if (CONFIG_SYS_NIOS_TMRIRQ == 50)
  117. .long _timebase_int@h /* Vector 50 - lopri timer*/
  118. #else
  119. .long _def_xhandler@h /* Vector 50 */
  120. #endif
  121. .long _def_xhandler@h /* Vector 51 */
  122. .long _def_xhandler@h /* Vector 52 */
  123. .long _def_xhandler@h /* Vector 53 */
  124. .long _def_xhandler@h /* Vector 54 */
  125. .long _def_xhandler@h /* Vector 55 */
  126. .long _def_xhandler@h /* Vector 56 */
  127. .long _def_xhandler@h /* Vector 57 */
  128. .long _def_xhandler@h /* Vector 58 */
  129. .long _def_xhandler@h /* Vector 59 */
  130. .long _def_xhandler@h /* Vector 60 */
  131. .long _def_xhandler@h /* Vector 61 */
  132. .long _def_xhandler@h /* Vector 62 */
  133. .long _def_xhandler@h /* Vector 63 */