interrupts.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:4k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * Miscellaneous definitions used to initialise the interrupt vector table
  3.  * with the machine-specific interrupt routines.
  4.  *
  5.  * This file is subject to the terms and conditions of the GNU General Public
  6.  * License.  See the file "COPYING" in the main directory of this archive
  7.  * for more details.
  8.  *
  9.  * Copyright (C) 1997 by Paul M. Antoine.
  10.  * reworked 1998 by Harald Koerfgen.
  11.  * Copyright (C) 2001, 2002  Maciej W. Rozycki
  12.  */
  13. #ifndef __ASM_DEC_INTERRUPTS_H
  14. #define __ASM_DEC_INTERRUPTS_H
  15. #include <asm/mipsregs.h>
  16. /*
  17.  * The list of possible system devices which provide an
  18.  * interrupt.  Not all devices exist on a given system.
  19.  */
  20. #define DEC_IRQ_CASCADE 0 /* cascade from CSR or I/O ASIC */
  21. /* Ordinary interrupts */
  22. #define DEC_IRQ_AB_RECV 1 /* ACCESS.bus receive */
  23. #define DEC_IRQ_AB_XMIT 2 /* ACCESS.bus transmit */
  24. #define DEC_IRQ_DZ11 3 /* DZ11 (DC7085) serial */
  25. #define DEC_IRQ_ASC 4 /* ASC (NCR53C94) SCSI */
  26. #define DEC_IRQ_FLOPPY 5 /* 82077 FDC */
  27. #define DEC_IRQ_FPU 6 /* R3k FPU */
  28. #define DEC_IRQ_HALT 7 /* HALT button or from ACCESS.Bus */
  29. #define DEC_IRQ_ISDN 8 /* Am79C30A ISDN */
  30. #define DEC_IRQ_LANCE 9 /* LANCE (Am7990) Ethernet */
  31. #define DEC_IRQ_MEMORY 10 /* memory, I/O bus write errors */
  32. #define DEC_IRQ_PSU 11 /* power supply unit warning */
  33. #define DEC_IRQ_RTC 12 /* DS1287 RTC */
  34. #define DEC_IRQ_SCC0 13 /* SCC (Z85C30) serial #0 */
  35. #define DEC_IRQ_SCC1 14 /* SCC (Z85C30) serial #1 */
  36. #define DEC_IRQ_SII 15 /* SII (DC7061) SCSI */
  37. #define DEC_IRQ_TC0 16 /* TURBOchannel slot #0 */
  38. #define DEC_IRQ_TC1 17 /* TURBOchannel slot #1 */
  39. #define DEC_IRQ_TC2 18 /* TURBOchannel slot #2 */
  40. #define DEC_IRQ_TIMER 19 /* ARC periodic timer */
  41. #define DEC_IRQ_VIDEO 20 /* framebuffer */
  42. /* I/O ASIC DMA interrupts */
  43. #define DEC_IRQ_ASC_MERR 21 /* ASC memory read error */
  44. #define DEC_IRQ_ASC_ERR 22 /* ASC page overrun */
  45. #define DEC_IRQ_ASC_DMA 23 /* ASC buffer pointer loaded */
  46. #define DEC_IRQ_FLOPPY_ERR 24 /* FDC error */
  47. #define DEC_IRQ_ISDN_ERR 25 /* ISDN memory read/overrun error */
  48. #define DEC_IRQ_ISDN_RXDMA 26 /* ISDN recv buffer pointer loaded */
  49. #define DEC_IRQ_ISDN_TXDMA 27 /* ISDN xmit buffer pointer loaded */
  50. #define DEC_IRQ_LANCE_MERR 28 /* LANCE memory read error */
  51. #define DEC_IRQ_SCC0A_RXERR 29 /* SCC0A (printer) receive overrun */
  52. #define DEC_IRQ_SCC0A_RXDMA 30 /* SCC0A receive half page */
  53. #define DEC_IRQ_SCC0A_TXERR 31 /* SCC0A xmit memory read/overrun */
  54. #define DEC_IRQ_SCC0A_TXDMA 32 /* SCC0A transmit page end */
  55. #define DEC_IRQ_SCC0B_RXERR 33 /* SCC0B (ACCESS.bus) receive overrun */
  56. #define DEC_IRQ_SCC0B_RXDMA 34 /* SCC0B receive half page */
  57. #define DEC_IRQ_SCC0B_TXERR 35 /* SCC0B xmit memory read/overrun */
  58. #define DEC_IRQ_SCC0B_TXDMA 36 /* SCC0B transmit page end */
  59. #define DEC_IRQ_SCC1A_RXERR 37 /* SCC1A (modem) receive overrun */
  60. #define DEC_IRQ_SCC1A_RXDMA 38 /* SCC1A receive half page */
  61. #define DEC_IRQ_SCC1A_TXERR 39 /* SCC1A xmit memory read/overrun */
  62. #define DEC_IRQ_SCC1A_TXDMA 40 /* SCC1A transmit page end */
  63. /* TC5 & TC6 are virtual slots for KN02's onboard devices */
  64. #define DEC_IRQ_TC5 DEC_IRQ_ASC /* virtual PMAZ-AA */
  65. #define DEC_IRQ_TC6 DEC_IRQ_LANCE /* virtual PMAD-AA */
  66. #define DEC_NR_INTS 41
  67. /* Largest of cpu mask_nr tables. */
  68. #define DEC_MAX_CPU_INTS 6
  69. /* Largest of asic mask_nr tables. */
  70. #define DEC_MAX_ASIC_INTS 9
  71. /*
  72.  * CPU interrupt bits common to all systems.
  73.  */
  74. #define DEC_CPU_INR_FPU 7 /* R3k FPU */
  75. #define DEC_CPU_INR_SW1 1 /* software #1 */
  76. #define DEC_CPU_INR_SW0 0 /* software #0 */
  77. #define DEC_CPU_IRQ_BASE 0 /* first IRQ assigned to CPU */
  78. #define DEC_CPU_IRQ_NR(n) ((n) + DEC_CPU_IRQ_BASE)
  79. #define DEC_CPU_IRQ_MASK(n) (1 << ((n) + CAUSEB_IP))
  80. #define DEC_CPU_IRQ_ALL (0xff << CAUSEB_IP)
  81. #ifndef __ASSEMBLY__
  82. /*
  83.  * Interrupt table structures to hide differences between systems.
  84.  */
  85. typedef union { int i; void *p; } int_ptr;
  86. extern int dec_interrupt[DEC_NR_INTS];
  87. extern int_ptr cpu_mask_nr_tbl[DEC_MAX_CPU_INTS][2];
  88. extern int_ptr asic_mask_nr_tbl[DEC_MAX_ASIC_INTS][2];
  89. extern int cpu_fpu_mask;
  90. /*
  91.  * Common interrupt routine prototypes for all DECStations
  92.  */
  93. extern void kn02_io_int(void);
  94. extern void kn02xa_io_int(void);
  95. extern void kn03_io_int(void);
  96. extern void asic_dma_int(void);
  97. extern void asic_all_int(void);
  98. extern void kn02_all_int(void);
  99. extern void cpu_all_int(void);
  100. extern void dec_intr_unimplemented(void);
  101. extern void asic_intr_unimplemented(void);
  102. #endif /* __ASSEMBLY__ */
  103. #endif