home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: AssemPro For Development Amiga Driver / Lowe_AssemProForDevelopmentAmigaDriver.adf / Includes / libraries / configregs.i next >
Encoding:
Text File  |  1978-06-06  |  7.6 KB  |  230 lines

  1.  
  2. ;**; configregs.i ;********************************************************
  3. ;
  4. ;  register and bit definitions for expansion boards
  5. ;
  6. ; Copyright (C) 1985,  Commodore-Amiga, Inc., All rights reserved.
  7. ;
  8. ; $Header: configregs.i,v 33.2 86/05/04 23:40:52 neil Exp $
  9. ;
  10. ; $Locker:  $
  11. ;
  12. ; $Log: configregs.i,v $
  13. ; Revision 33.2  86/05/04  23:40:52  neil
  14. ; added diag area
  15. ; Revision 33.1  86/04/01  12:17:22  neil
  16. ; First version
  17. ;
  18. ;***************************************************************************
  19.  
  20.         IFND    LIBRARIES_CONFIGREGS_I@
  21. LIBRARIES_CONFIGREGS_I@  =     1
  22.  
  23. ;; Expansion boards are actually organized such that only one nibble per
  24. ;; word (16 bits) are valid information.  This table is structured
  25. ;; as LOGICAL information.  This means that it never corresponds
  26. ;; exactly with a physical implementation.
  27. ;*
  28. ;; The expansion space is logically split into two regions:
  29. ;; a rom portion and a control portion.  The rom portion is
  30. ;; actually stored in one's complement form (except for the
  31. ;; er_type field).
  32.  
  33.  
  34.  STRUCTURE ExpansionRom,0
  35.     UBYTE       er_Type
  36.     UBYTE       er_Product
  37.     UBYTE       er_Flags
  38.     UBYTE       er_Reserved03
  39.     UWORD       er_Manufacturer
  40.     ULONG       er_SerialNumber
  41.     UWORD       er_InitDiagVec
  42.     UBYTE       er_Reserved0c
  43.     UBYTE       er_Reserved0d
  44.     UBYTE       er_Reserved0e
  45.     UBYTE       er_Reserved0f
  46.     LABEL       ExpansionRom_SIZEOF
  47.  
  48.  STRUCTURE ExpansionControl,0
  49.     UBYTE       ec_Interrupt            ; interrupt control register
  50.     UBYTE       ec_Reserved11
  51.     UBYTE       ec_BaseAddress          ; set new config address
  52.     UBYTE       ec_Shutup               ; don't respond, pass config out
  53.     UBYTE       ec_Reserved14
  54.     UBYTE       ec_Reserved15
  55.     UBYTE       ec_Reserved16
  56.     UBYTE       ec_Reserved17
  57.     UBYTE       ec_Reserved18
  58.     UBYTE       ec_Reserved19
  59.     UBYTE       ec_Reserved1a
  60.     UBYTE       ec_Reserved1b
  61.     UBYTE       ec_Reserved1c
  62.     UBYTE       ec_Reserved1d
  63.     UBYTE       ec_Reserved1e
  64.     UBYTE       ec_Reserved1f
  65.     LABEL       ExpansionControl_SIZEOF
  66.  
  67. ;*
  68. ;; many of the constants below consist of a triplet of equivalent
  69. ;; definitions: xxMASK is a bit mask of those bits that matter.
  70. ;; xxBIT is the starting bit number of the field.  xxSIZE is the
  71. ;; number of bits that make up the definition.  This method is
  72. ;; used when the field is larger than one bit.
  73. ;*
  74. ;; If the field is only one bit wide then the xxB_xx and xxF_xx convention
  75. ;; is used (xxB_xx is the bit number, and xxF_xx is mask of the bit).
  76. ;*
  77.  
  78. ;; manifest constants ;/
  79. E_SLOTSIZE              EQU     $10000
  80. E_SLOTMASK              EQU     $ffff
  81. E_SLOTSHIFT             EQU     16
  82.  
  83. ;; these define the two free regions of Zorro memory space.
  84. ;; THESE MAY WELL CHANGE FOR FUTURE PRODUCTS|
  85. E_EXPANSIONBASE         EQU     $e80000
  86. E_EXPANSIONSIZE         EQU     $080000
  87. E_EXPANSIONSLOTS        EQU     8
  88.  
  89. E_MEMORYBASE            EQU     $200000
  90. E_MEMORYSIZE            EQU     $800000
  91. E_MEMORYSLOTS           EQU     128
  92.  
  93.  
  94.  
  95. ;*****; ec_Type definitions ;/
  96.  
  97. ;; board type -- ignore "old style" boards ;/
  98. ERT_TYPEMASK            EQU     $c0
  99. ERT_TYPEBIT             EQU     6
  100. ERT_TYPESIZE            EQU     2
  101. ERT_NEWBOARD            EQU     $c0
  102.  
  103.  
  104. ;; type field memory size ;/
  105. ERT_MEMMASK             EQU     $07
  106. ERT_MEMBIT              EQU     0
  107. ERT_MEMSIZE             EQU     3
  108.  
  109.  
  110. ;; other bits defined in type field ;/
  111. ;        BITDEF  ERT,CHAINEDCONFIG,3
  112. ERTB_CHAINEDCONFIG = 3
  113. ERTF_CHAINEDCONFIG = 1<<3
  114. ;        BITDEF  ERT,DIAGVALID,4
  115. ERTB_DIAGVALID = 4
  116. ERTF_DIAGVALID = 1<<4
  117. ;        BITDEF  ERT,MEMLIST,5
  118. ERTB_MEMLIST = 5
  119. ERTF_MEMLIST = 1<<5
  120.  
  121.  
  122. ;; er_Flags byte -- for those things that didn't fit into the type byte ;/
  123. ;        BITDEF  ERF,MEMSPACE,7          ; wants to be in 8 meg space.  Also
  124. ERFB_MEMSPACE = 7          ; wants to be in 8 meg space.  Also
  125. ERFF_MEMSPACE = 1<<7          ; wants to be in 8 meg space.  Also
  126.                                         ;     implies that board is moveable
  127. ;        BITDEF  ERF,NOSHUTUP,6          ; board can't be shut up.  Must not
  128. ERFB_NOSHUTUP = 6          ; board can't be shut up.  Must not
  129. ERFF_NOSHUTUP = 1<<6          ; board can't be shut up.  Must not
  130.                                         ;     be a board.  Must be a box that
  131.                                         ;     does not pass on the bus.
  132.  
  133.  
  134. ;; interrupt control register ;/
  135. ;        BITDEF  ECI,INTENA,1
  136. ECIB_INTENA = 1
  137. ECIF_INTENA = 1<<1
  138. ;        BITDEF  ECI,RESET,3
  139. ECIB_RESET = 3
  140. ECIF_RESET = 1<<3
  141. ;        BITDEF  ECI,INT2PEND,4
  142. ECIB_INT2PEND = 4
  143. ECIF_INT2PEND = 1<<4
  144. ;        BITDEF  ECI,INT6PEND,5
  145. ECIB_INT6PEND = 5
  146. ECIF_INT6PEND = 1<<5
  147. ;        BITDEF  ECI,INT7PEND,6
  148. ECIB_INT7PEND = 6
  149. ECIF_INT7PEND = 1<<6
  150. ;        BITDEF  ECI,INTERRUPTING,7
  151. ECIB_INTERRUPTING = 7
  152. ECIF_INTERRUPTING = 1<<7
  153.  
  154.  
  155. ;*************************************************************************
  156. ;*
  157. ;; these are the specifications for the diagnostic area.  If the Diagnostic
  158. ;; Address Valid bit is set in the Board Type byte (the first byte in
  159. ;; expansion space) then the Diag Init vector contains a valid offset.
  160. ;*
  161. ;; The Diag Init vector is actually a word offset from the base of the
  162. ;; board.  The resulting address points to the base of the DiagArea
  163. ;; structure.  The structure may be physically implemented either four,
  164. ;; eight, or sixteen bits wide.  The code will be copied out into
  165. ;; ram first before being called.
  166. ;*
  167. ;; The da_Size field, and both code offsets (da_DiagPoint and da_BootPoint)
  168. ;; are offsets from the diag area AFTER it has been copied into ram, and
  169. ;; "de-nibbleized" (if needed).  Inotherwords, the size is the size of
  170. ;; the actual information, not how much address space is required to
  171. ;; store it.
  172. ;*
  173. ;; All bits are encoded with uninverted logic (e.g. 5 volts on the bus
  174. ;; is a logic one).
  175. ;*
  176. ;; If your board is to make use of the boot facility then it must leave
  177. ;; its config area available even after it has been configured.  Your
  178. ;; boot vector will be called AFTER your board's final address has been
  179. ;; set.
  180. ;*
  181. ;*************************************************************************
  182.  
  183.  STRUCTURE DiagArea,0
  184.     UBYTE       da_Config       ; see below for definitions
  185.     UBYTE       da_Flags        ; see below for definitions
  186.     UWORD       da_Size         ; the size (in bytes) of the total diag area
  187.     UWORD       da_DiagPoint    ; where to start for diagnostics, or zero
  188.     UWORD       da_BootPoint    ; where to start for booting
  189.     UWORD       da_Name         ; offset in diag area where a string
  190.                                 ;   identifier can be found (or zero if no
  191.                                 ;   identifier is present).
  192.  
  193.     UWORD       da_Reserved01   ; two words of reserved data.  must be zero.
  194.     UWORD       da_Reserved02
  195.     LABEL       DiagArea_SIZEOF
  196.  
  197. ; da_Config definitions
  198. DAC_BUSWIDTH    EQU     $C0     ; two bits for bus width
  199. DAC_NIBBLEWIDE  EQU     $00
  200. DAC_BYTEWIDE    EQU     $40
  201. DAC_WORDWIDE    EQU     $80
  202.  
  203. DAC_BOOTTIME    EQU     $30     ; two bits for when to boot
  204. DAC_NEVER       EQU     $00     ; obvious
  205. DAC_CONFIGTIME  EQU     $10     ; call da_BootPoint when first configing the
  206.                                 ;   the device
  207. DAC_BINDTIME    EQU     $20     ; run when binding drivers to boards
  208.  
  209. ;*
  210. ;; These are the calling conventions for Diag or Boot area
  211. ;*
  212. ;; A7 -- points to at least 2K of stack
  213. ;; A6 -- ExecBase
  214. ;; A5 -- ExpansionBase
  215. ;; A3 -- your board's ConfigDev structure
  216. ;; A2 -- Base of diag/init area that was copied
  217. ;; A0 -- Base of your board
  218. ;*
  219. ;; Your board should return a value in D0.  If this value is NULL, then
  220. ;; the diag/init area that was copied in will be returned to the free
  221. ;; memory pool.
  222. ;*
  223.  
  224.  
  225.         ENDIF
  226.         END
  227.