1 #ifndef LIBRARIES_CONFIGREGS_H
2 #define LIBRARIES_CONFIGREGS_H
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: AutoConfig(tm) hardware register definitions
13 #include <exec/types.h>
22 UWORD er_Manufacturer
;
23 ULONG er_SerialNumber
;
32 struct DiagArea
*DiagArea
;
36 /* This allows for simpler definition when assigning a DiagArea pointer. */
37 #define er_Reserved0c er_.Reserved0.c
38 #define er_Reserved0d er_.Reserved0.d
39 #define er_Reserved0e er_.Reserved0.e
40 #define er_Reserved0f er_.Reserved0.f
41 #define er_DiagArea er_.DiagArea
43 struct ExpansionControl
63 #define E_SLOTSIZE 0x10000
64 #define E_SLOTMASK 0xFFFF
65 #define E_SLOTSHIFT 16
67 #define E_EXPANSIONBASE 0x00e80000
68 #define E_EXPANSIONSIZE 0x00080000
69 #define E_EXPANSIONSLOTS 8
71 #define E_MEMORYBASE 0x00200000
72 #define E_MEMORYSIZE 0x00800000
73 #define E_MEMORYSLOTS 128
75 #define EZ3_EXPANSIONBASE 0xFF000000
76 #define EZ3_CONFIGAREA 0x40000000
77 #define EZ3_CONFIGAREAEND 0x7FFFFFFF
78 #define EZ3_SIZEGRANULARITY 0x00080000
81 #define ERT_TYPEMASK 0xc0
83 #define ERT_TYPESIZE 2
84 #define ERT_NEWBOARD 0xc0
85 #define ERT_ZORROII ERT_NEWBOARD
86 #define ERT_ZORROIII 0x80
88 #define ERTB_MEMLIST 5
89 #define ERTF_MEMLIST (1L<<5)
90 #define ERTB_DIAGVALID 4
91 #define ERTF_DIAGVALID (1L<<4)
92 #define ERTB_CHAINEDCONFIG 3
93 #define ERTF_CHAINEDCONFIG (1L<<3)
95 #define ERT_MEMMASK 0x7
100 #define ERFB_MEMSPACE 7
101 #define ERFF_MEMSPACE (1L<<7)
102 #define ERFB_NOSHUTUP 6
103 #define ERFF_NOSHUTUP (1L<<6)
104 #define ERFB_EXTENDED 5
105 #define ERFF_EXTENDED (1L<<5)
106 #define ERFB_ZORRO_III 4
107 #define ERFF_ZORRO_III (1L<<4)
109 #define ERT_Z3_SSMASK 0x0F
110 #define ERT_Z3_SSBIT 0
111 #define ERT_Z3_SSSIZE 4
113 /* ec_Interrupt register (unused) */
114 #define ECIB_INTENA 1
115 #define ECIF_INTENA (1L<<1)
117 #define ECIF_RESET (1L<<3)
118 #define ECIB_INT2PEND 4
119 #define ECIF_INT2PEND (1L<<4)
120 #define ECIB_INT6PEND 5
121 #define ECIF_INT6PEND (1L<<5)
122 #define ECIB_INT7PEND 6
123 #define ECIF_INT7PEND (1L<<6)
124 #define ECIB_INTERRUPTING 7
125 #define ECIF_INTERRUPTING (1L<<7)
127 #define ERT_MEMNEEDED(t) \
128 (((t)&ERT_MEMMASK)? 0x10000 << (((t)&ERT_MEMMASK) -1) : 0x800000 )
130 #define ERT_SLOTSNEEDED(t) \
131 (((t)&ERT_MEMMASK)? 1 << (((t)&ERT_MEMMASK) -1) : 0x80 )
134 #define EC_MEMADDR(slot) ((slot) << (E_SLOTSHIFT))
135 #define EROFFSET(er) (int)&((struct ExpansionRom *)0)->er)
136 #define ECOFFSET(ec) \
137 ((sizeof(struct ExpansionRom)+((int)&((struct ExpansionControl *)0)->ec))
153 #define DAC_BUSWIDTH 0xC0
154 #define DAC_NIBBLEWIDE 0x00
155 #define DAC_BYTEWIDE 0x40
156 #define DAC_WORDWIDE 0x80
158 #define DAC_BOOTTIME 0x30
159 #define DAC_NEVER 0x00
160 #define DAC_CONFIGTIME 0x10
161 #define DAC_BINDTIME 0x20
163 /* da_DiagPoint function definition should be as follows
165 AROS_UFH5(ULONG, diagPoint,
166 AROS_UFHA(APTR, boardBase, A0),
167 AROS_UFHA(APTR, diagCopy, A2),
168 AROS_UFHA(struct ConfigDev *, configDev, A3),
169 AROS_UFHA(struct ExpansionBase *, ExpansionBase, A5),
170 AROS_UFHA(struct ExecBase *, SysBase, A6)
176 As most of these will be in ROMs on the expansion board, this will
177 generally be coded in assembly language.
181 #endif /* LIBRARIES_CONFIGREGS_H */