traps_no.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /*
  2. * linux/include/asm/traps.h
  3. *
  4. * Copyright (C) 1993 Hamish Macdonald
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file COPYING in the main directory of this archive
  8. * for more details.
  9. */
  10. #ifndef _M68KNOMMU_TRAPS_H
  11. #define _M68KNOMMU_TRAPS_H
  12. #ifndef __ASSEMBLY__
  13. typedef void (*e_vector)(void);
  14. extern e_vector vectors[];
  15. extern void init_vectors(void);
  16. extern void enable_vector(unsigned int irq);
  17. extern void disable_vector(unsigned int irq);
  18. extern void ack_vector(unsigned int irq);
  19. #endif
  20. #define VEC_BUSERR (2)
  21. #define VEC_ADDRERR (3)
  22. #define VEC_ILLEGAL (4)
  23. #define VEC_ZERODIV (5)
  24. #define VEC_CHK (6)
  25. #define VEC_TRAP (7)
  26. #define VEC_PRIV (8)
  27. #define VEC_TRACE (9)
  28. #define VEC_LINE10 (10)
  29. #define VEC_LINE11 (11)
  30. #define VEC_RESV1 (12)
  31. #define VEC_COPROC (13)
  32. #define VEC_FORMAT (14)
  33. #define VEC_UNINT (15)
  34. #define VEC_SPUR (24)
  35. #define VEC_INT1 (25)
  36. #define VEC_INT2 (26)
  37. #define VEC_INT3 (27)
  38. #define VEC_INT4 (28)
  39. #define VEC_INT5 (29)
  40. #define VEC_INT6 (30)
  41. #define VEC_INT7 (31)
  42. #define VEC_SYS (32)
  43. #define VEC_TRAP1 (33)
  44. #define VEC_TRAP2 (34)
  45. #define VEC_TRAP3 (35)
  46. #define VEC_TRAP4 (36)
  47. #define VEC_TRAP5 (37)
  48. #define VEC_TRAP6 (38)
  49. #define VEC_TRAP7 (39)
  50. #define VEC_TRAP8 (40)
  51. #define VEC_TRAP9 (41)
  52. #define VEC_TRAP10 (42)
  53. #define VEC_TRAP11 (43)
  54. #define VEC_TRAP12 (44)
  55. #define VEC_TRAP13 (45)
  56. #define VEC_TRAP14 (46)
  57. #define VEC_TRAP15 (47)
  58. #define VEC_FPBRUC (48)
  59. #define VEC_FPIR (49)
  60. #define VEC_FPDIVZ (50)
  61. #define VEC_FPUNDER (51)
  62. #define VEC_FPOE (52)
  63. #define VEC_FPOVER (53)
  64. #define VEC_FPNAN (54)
  65. #define VEC_FPUNSUP (55)
  66. #define VEC_UNIMPEA (60)
  67. #define VEC_UNIMPII (61)
  68. #define VEC_USER (64)
  69. #define VECOFF(vec) ((vec)<<2)
  70. #ifndef __ASSEMBLY__
  71. /* Status register bits */
  72. #define PS_T (0x8000)
  73. #define PS_S (0x2000)
  74. #define PS_M (0x1000)
  75. #define PS_C (0x0001)
  76. /* structure for stack frames */
  77. struct frame {
  78. struct pt_regs ptregs;
  79. union {
  80. struct {
  81. unsigned long iaddr; /* instruction address */
  82. } fmt2;
  83. struct {
  84. unsigned long effaddr; /* effective address */
  85. } fmt3;
  86. struct {
  87. unsigned long effaddr; /* effective address */
  88. unsigned long pc; /* pc of faulted instr */
  89. } fmt4;
  90. struct {
  91. unsigned long effaddr; /* effective address */
  92. unsigned short ssw; /* special status word */
  93. unsigned short wb3s; /* write back 3 status */
  94. unsigned short wb2s; /* write back 2 status */
  95. unsigned short wb1s; /* write back 1 status */
  96. unsigned long faddr; /* fault address */
  97. unsigned long wb3a; /* write back 3 address */
  98. unsigned long wb3d; /* write back 3 data */
  99. unsigned long wb2a; /* write back 2 address */
  100. unsigned long wb2d; /* write back 2 data */
  101. unsigned long wb1a; /* write back 1 address */
  102. unsigned long wb1dpd0; /* write back 1 data/push data 0*/
  103. unsigned long pd1; /* push data 1*/
  104. unsigned long pd2; /* push data 2*/
  105. unsigned long pd3; /* push data 3*/
  106. } fmt7;
  107. struct {
  108. unsigned long iaddr; /* instruction address */
  109. unsigned short int1[4]; /* internal registers */
  110. } fmt9;
  111. struct {
  112. unsigned short int1;
  113. unsigned short ssw; /* special status word */
  114. unsigned short isc; /* instruction stage c */
  115. unsigned short isb; /* instruction stage b */
  116. unsigned long daddr; /* data cycle fault address */
  117. unsigned short int2[2];
  118. unsigned long dobuf; /* data cycle output buffer */
  119. unsigned short int3[2];
  120. } fmta;
  121. struct {
  122. unsigned short int1;
  123. unsigned short ssw; /* special status word */
  124. unsigned short isc; /* instruction stage c */
  125. unsigned short isb; /* instruction stage b */
  126. unsigned long daddr; /* data cycle fault address */
  127. unsigned short int2[2];
  128. unsigned long dobuf; /* data cycle output buffer */
  129. unsigned short int3[4];
  130. unsigned long baddr; /* stage B address */
  131. unsigned short int4[2];
  132. unsigned long dibuf; /* data cycle input buffer */
  133. unsigned short int5[3];
  134. unsigned ver : 4; /* stack frame version # */
  135. unsigned int6:12;
  136. unsigned short int7[18];
  137. } fmtb;
  138. } un;
  139. };
  140. #endif /* __ASSEMBLY__ */
  141. #endif /* _M68KNOMMU_TRAPS_H */