traps.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * U-boot - traps.h
  3. *
  4. * Copyright (c) 2005-2007 Analog Devices Inc.
  5. *
  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
  26. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  27. * MA 02110-1301 USA
  28. */
  29. /*
  30. */
  31. #ifndef _BLACKFIN_TRAPS_H
  32. #define _BLACKFIN_TRAPS_H
  33. #ifndef __ASSEMBLY__
  34. typedef void (*e_vector) (void);
  35. extern e_vector vectors[];
  36. #endif
  37. #define VEC_SYS (0)
  38. #define VEC_EXCPT01 (1)
  39. #define VEC_EXCPT02 (2)
  40. #define VEC_EXCPT03 (3)
  41. #define VEC_EXCPT04 (4)
  42. #define VEC_EXCPT05 (5)
  43. #define VEC_EXCPT06 (6)
  44. #define VEC_EXCPT07 (7)
  45. #define VEC_EXCPT08 (8)
  46. #define VEC_EXCPT09 (9)
  47. #define VEC_EXCPT10 (10)
  48. #define VEC_EXCPT11 (11)
  49. #define VEC_EXCPT12 (12)
  50. #define VEC_EXCPT13 (13)
  51. #define VEC_EXCPT14 (14)
  52. #define VEC_EXCPT15 (15)
  53. #define VEC_STEP (16)
  54. #define VEC_OVFLOW (17)
  55. #define VEC_UNDEF_I (33)
  56. #define VEC_ILGAL_I (34)
  57. #define VEC_CPLB_VL (35)
  58. #define VEC_MISALI_D (36)
  59. #define VEC_UNCOV (37)
  60. #define VEC_CPLB_M (38)
  61. #define VEC_CPLB_MHIT (39)
  62. #define VEC_WATCH (40)
  63. #define VEC_ISTRU_VL (41)
  64. #define VEC_MISALI_I (42)
  65. #define VEC_CPLB_I_VL (43)
  66. #define VEC_CPLB_I_M (44)
  67. #define VEC_CPLB_I_MHIT (45)
  68. #define VEC_ILL_RES (46) /* including unvalid supervisor mode insn */
  69. #define VECOFF(vec) ((vec)<<2)
  70. #ifndef __ASSEMBLY__
  71. /* Status register bits */
  72. #define PS_T (0x8000)
  73. #define PS_S (0x0c00) /* Supervisor mode = 0b01 */
  74. #define PS_D (0x0c00) /* Debug mode = 0b1x */
  75. #define PS_M (0x1000)
  76. #define PS_C (0x0001)
  77. #endif
  78. #endif