home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / architecture / m68k / intr.h next >
Text File  |  1992-07-21  |  2KB  |  82 lines

  1. /*    @(#)intr.h    1.0    10/16/91    (c) 1991 NeXT Computer Inc.    */
  2.  
  3. /* 
  4.  * HISTORY
  5.  * 16-Oct-91  John Seamons (jks) at NeXT
  6.  *    Split out from cpu.h.
  7.  */
  8.  
  9.  
  10. #ifndef    _M68K_INTR_
  11. #define    _M68K_INTR_
  12.  
  13. /*
  14.  * Interrupt structure.
  15.  * BASE and BITS define the origin and length of the bit field in the
  16.  * interrupt status/mask register for the particular interrupt level.
  17.  * The first component of the interrupt device name indicates the bit
  18.  * position in the interrupt status and mask registers; the second is the
  19.  * interrupt level; the third is the bit index relative to the start of the
  20.  * bit field.
  21.  */
  22. #define    I(l,i,b)    (((b) << 8) | ((l) << 4) | (i))
  23. #define    I_INDEX(i)    ((i) & 0xf)
  24. #define    I_IPL(i)    (((i) >> 4) & 7)
  25. #define    I_BIT(i)    ( 1 << (((i) >> 8) & 0x1f))
  26.  
  27. #define    I_IPL7_BASE    0
  28. #define    I_IPL7_BITS    2
  29. #define    I_NMI        I(7,0,31)
  30. #define    I_PARITY_ADBNMI    I(7,1,30)
  31.  
  32. #define    I_IPL6_BASE    2
  33. #define    I_IPL6_BITS    12
  34. #define    I_TIMER        I(6,0,29)
  35. #define    I_ENETX_DMA    I(6,1,28)
  36. #define    I_ENETR_DMA    I(6,2,27)
  37. #define    I_SCSI_DMA    I(6,3,26)
  38. #define    I_OPTICAL_DMA    I(6,4,25)    /* dma 313 chip */
  39. #define    I_PRINTER_DMA    I(6,5,24)
  40. #define    I_SOUND_OUT_DMA    I(6,6,23)
  41. #define    I_SOUND_IN_DMA    I(6,7,22)
  42. #define    I_SCC_DMA    I(6,8,21)    /* dma 313 chip */
  43. #define    I_DSP_DMA    I(6,9,20)
  44.  
  45. #define    I_IPL5_BASE    14
  46. #define    I_IPL5_BITS    3
  47. #define    I_SCC        I(5,0,17)
  48. #define    I_)TE    I(5,1,16)
  49. #define    I_BUS        I(5,2,15)
  50.  
  51. #define    I_IPL4_BASE    17
  52. #define    I_IPL4_BITS    1
  53. #define    I_DSP        I(4,0,14)
  54.  
  55. #define    I_IPL3_BASE    18
  56. #define    I_IPL3_BITS    12
  57. #define    I_VIDEO        ((dma_chip != 313)? I(3,0,13) : I(3,8,5))
  58. #define    I_C16_VIDEO    I(3,0,13)    /* Warp 9C */
  59. #define    I_OPTICAL    I(3,0,13)    /* dma 313 chip */
  60. #define    I_SCSI        I(3,1,12)
  61. #define    I_PRINTER    I(3,2,11)
  62. #define    I_ENETX        I(3,3,10)
  63. #define    I_ENETR        I(3,4,9)
  64. #define    I_SOUND_OVRUN    I(3,5,8)
  65. #define    I_FLOPPY    I(3,6,7)
  66. #define    I_SPARE_3    I(3,7,6)
  67. #define    I_VIDEO_IN    I(3,8,5)
  68. #define    I_MONITOR    I(3,9,4)
  69. #define    I_KYBD_MOUSE    I(3,10,3)
  70. #define    I_RTC        I(3,11,2)
  71.  
  72. #define    I_IPL2_BASE    30
  73. #define    I_IPL2_BITS    1
  74. #define    I_SOFTINT1    I(2,0,1)
  75.  
  76. #define    I_IPL1_BASE    31
  77. #define    I_IPL1_BITS    1
  78. #define    I_SOFTINT0    I(1,0,0)
  79.  
  80. #endif    _M68K_INTR_
  81.  
  82.