home *** CD-ROM | disk | FTP | other *** search
/ Doom Fever / Doom_Fever-1995_Maple_Media.iso / dmutil / drivers.zip / 8390.INC < prev    next >
Text File  |  1990-12-12  |  5KB  |  121 lines

  1. ; The EN registers - the DS8390 chip registers
  2. ; There are two (really 3) pages of registers in the chip. You select
  3. ; which page you want, then address them at offsets 00-0F from base.
  4. ; The chip command register (EN_CCMD) appears in both pages.
  5. ; EN_OFF is the offset from the board's base register to the EN registers.
  6.  
  7. EN_CCMD        equ    000h+EN_OFF    ; Chip's command register
  8.  
  9. ; Page 0
  10.  
  11. EN0_CLDALO    equ    001h+EN_OFF    ; Low byte of current local dma addr  RD
  12. EN0_STARTPG    equ    001h+EN_OFF    ; Starting page of ring bfr WR
  13. EN0_CLDAHI    equ    002h+EN_OFF    ; High byte of current local dma addr  RD
  14. EN0_STOPPG    equ    002h+EN_OFF    ; Ending page +1 of ring bfr WR
  15. EN0_BOUNDARY    equ    003h+EN_OFF    ; Boundary page of ring bfr RD WR
  16. EN0_TSR        equ    004h+EN_OFF    ; Transmit status reg RD
  17. EN0_TPSR    equ    004h+EN_OFF    ; Transmit starting page WR
  18. EN0_NCR        equ    005h+EN_OFF    ; Number of collision reg RD
  19. EN0_TCNTLO    equ    005h+EN_OFF    ; Low  byte of tx byte count WR
  20. EN0_FIFO    equ    006h+EN_OFF    ; FIFO RD
  21. EN0_TCNTHI    equ    006h+EN_OFF    ; High byte of tx byte count WR
  22. EN0_ISR        equ    007h+EN_OFF    ; Interrupt status reg RD WR
  23. EN0_CRDALO    equ    008h+EN_OFF    ; low byte of current remote dma address RD
  24. EN0_RSARLO    equ    008h+EN_OFF    ; Remote start address reg 0
  25. EN0_CRDAHI    equ    009h+EN_OFF    ; high byte of current remote dma address RD
  26. EN0_RSARHI    equ    009h+EN_OFF    ; Remote start address reg 1
  27. EN0_RCNTLO    equ    00ah+EN_OFF    ; Remote byte count reg WR
  28. EN0_RCNTHI    equ    00bh+EN_OFF    ; Remote byte count reg WR
  29. EN0_RSR        equ    00ch+EN_OFF    ; rx status reg RD
  30. EN0_RXCR    equ    00ch+EN_OFF    ; RX control reg WR
  31. EN0_TXCR    equ    00dh+EN_OFF    ; TX control reg WR
  32. EN0_COUNTER0    equ    00dh+EN_OFF    ; Rcv alignment error counter RD
  33. EN0_DCFG    equ    00eh+EN_OFF    ; Data configuration reg WR
  34. EN0_COUNTER1    equ    00eh+EN_OFF    ; Rcv CRC error counter RD
  35. EN0_IMR        equ    00fh+EN_OFF    ; Interrupt mask reg WR
  36. EN0_COUNTER2    equ    00fh+EN_OFF    ; Rcv missed frame error counter RD
  37.  
  38. ; Page 1
  39.  
  40. EN1_PHYS    equ    001h+EN_OFF    ; This board's physical enet addr RD WR
  41. EN1_CURPAG    equ    007h+EN_OFF    ; Current memory page RD WR
  42. EN1_MULT    equ    008h+EN_OFF    ; Multicast filter mask array (8 bytes) RD WR
  43.  
  44. ; Chip commands in EN_CCMD
  45. ENC_STOP    equ    001h    ; Stop the chip
  46. ENC_START    equ    002h    ; Start the chip
  47. ENC_TRANS    equ    004h    ; Transmit a frame
  48. ENC_RREAD    equ    008h    ; remote read
  49. ENC_RWRITE    equ    010h    ; remote write
  50. ENC_NODMA    equ    020h    ; No remote DMA used on this card
  51. ENC_PAGE0    equ    000h    ; Select page 0 of chip registers
  52. ENC_PAGE1    equ    040h    ; Select page 1 of chip registers
  53.  
  54. ; Commands for EN0_RXCR - RX control reg
  55. ENRXCR_CRC    equ    001h    ; Save error pkts
  56. ENRXCR_RUNT    equ    002h    ; Accept runt pkt
  57. ENRXCR_BCST    equ    004h    ; Accept broadcasts
  58. ENRXCR_MULTI    equ    008h    ; Multicast (if pass filter)
  59. ENRXCR_PROMP    equ    010h    ; Promiscuous physical addresses
  60. ENRXCR_MON    equ    020h    ; Monitor mode (no packets rcvd)
  61.  
  62. ; Bits in EN0_TXCR - transmit control reg
  63. ENTXCR_CRC    equ    001h        ; inhibit CRC, do not append crc
  64. ENTXCR_LOOP    equ    002h        ; Set loopback mode
  65. ENTXCR_LB01    equ    006h        ; encoded loopback control
  66. ENTXCR_ATD    equ    008h        ; auto tx disable
  67. ENTXCR_OFST    equ    010h        ; collision offset enable
  68.  
  69. ; Bits in EN0_DCFG - Data config register
  70. ENDCFG_WTS    equ    001h    ; word transfer mode selection
  71. ENDCFG_BOS    equ    002h    ; byte order selection
  72. ENDCFG_LAS    equ    004h    ; long addr selection
  73. ENDCFG_BMS    equ    008h    ; burst mode selection
  74. ENDCFG_ARM    equ    010h    ; autoinitialize remote
  75. ENDCFG_FT00    equ    000h    ; burst length selection
  76. ENDCFG_FT01    equ    020h    ; burst length selection
  77. ENDCFG_FT10    equ    040h    ; burst length selection
  78. ENDCFG_FT11    equ    060h    ; burst length selection
  79.  
  80. ; Bits in EN0_ISR - Interrupt status register
  81. ENISR_RX    equ    001h    ; Receiver, no error
  82. ENISR_TX    equ    002h    ; Transmitter, no error
  83. ENISR_RX_ERR    equ    004h    ; Receiver, with error
  84. ENISR_TX_ERR    equ    008h    ; Transmitter, with error
  85. ENISR_OVER    equ    010h    ; Receiver overwrote the ring
  86. ENISR_COUNTERS    equ    020h    ; Counters need emptying
  87. ENISR_RDC    equ    040h    ; remote dma complete
  88. ENISR_RESET    equ    080h    ; Reset completed
  89.  
  90. ENISR_ALL    equ    03fh    ; Interrupts we will enable
  91.  
  92. ; Bits in received packet status byte and EN0_RSR
  93. ENRSR_RXOK    equ    001h    ; Received a good packet
  94. ENRSR_CRC    equ    002h    ; CRC error
  95. ENRSR_FAE    equ    004h    ; frame alignment error
  96. ENRSR_FO    equ    008h    ; FIFO overrun
  97. ENRSR_MPA    equ    010h    ; missed pkt
  98. ENRSR_PHY    equ    020h    ; physical/multicase address
  99. ENRSR_DIS    equ    040h    ; receiver disable. set in monitor mode
  100. ENRSR_DEF    equ    080h    ; deferring
  101.  
  102. ; Bits in EN0_TSR -  TX status reg
  103.  
  104. ENTSR_PTX    equ    001h    ; Packet transmitted without error
  105. ENTSR_DFR    equ    002h    ; non deferred tx
  106. ENTSR_COLL    equ    004h    ; Collided at least once
  107. ENTSR_COLL16    equ    008h    ; Collided 16 times and was dropped
  108. ENTSR_CRS    equ    010h    ; carrier sense lost
  109. ENTSR_FU    equ    020h    ; TX FIFO Underrun
  110. ENTSR_CDH    equ    040h    ; collision detect heartbeat
  111. ENTSR_OWC    equ    080h    ; out of window collision
  112.  
  113. ; Description of header of each packet in receive area of memory
  114.  
  115. EN_RBUF_STAT    equ    0    ; Received frame status
  116. EN_RBUF_NXT_PG    equ    1    ; Page after this frame
  117. EN_RBUF_SIZE_LO    equ    2    ; Length of this frame
  118. EN_RBUF_SIZE_HI    equ    3    ; Length of this frame
  119. EN_RBUF_NHDR    equ    4    ; Length of above header area
  120.  
  121.