Merge from vendor branch TEXINFO:
[dragonfly.git] / usr.sbin / stallion / bootcode / stl.4
1 .\" Copyright (c) 1996-1998 Greg Ungerer (gerg@stallion.oz.au).
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by Greg Ungerer.
15 .\" 4. Neither the name of the author nor the names of any co-contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"    without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\" $FreeBSD: src/usr.sbin/stallion/bootcode/stl.4,v 1.8.2.5 2001/12/14 16:41:52 ru Exp $
32 .\" $DragonFly: src/usr.sbin/stallion/bootcode/stl.4,v 1.3 2005/08/01 01:49:18 swildner Exp $
33 .\"
34 .Dd January 8, 1998
35 .Os
36 .Dt STL 4 i386
37 .Sh NAME
38 .Nm stl ,
39 .Nm stli
40 .Nd "drivers for Stallion Technologies multiport serial controllers"
41 .Sh SYNOPSIS
42 .Cd "device stl"
43 .Cd "device stl0 at isa? port <addr> irq <irq>"
44 .Cd "device stli0 at isa? port <io-addr> iomem <mem-addr> iosiz <size> flags <type> "
45 .Cd "device stli0 at eisa? port <io-addr> iomem <mem-addr> iosiz <size> flags <type> "
46 .Sh DESCRIPTION
47 .Pp
48 This is a kernel driver for Stallion Technologies multiport serial boards.
49 There are two drivers, each supporting a different class of boards.
50 The
51 .Nm
52 driver supports the EasyIO,
53 EasyConnection 8/32 and
54 EasyConnection 8/64-PCI boards,
55 while the
56 .Nm stli
57 driver supports all other types, including
58 ONboard, Brumby and EasyConnection 8/64 (ISA and EISA).
59 .Sh CONFIGURATION
60 .Pp
61 Each non-PCI board installed in the system needs a configuration entry in the
62 kernel configuration file.
63 Slightly different options and parameters are required for each of the
64 different board types.
65 Depending on the type of board one of the
66 .Nm
67 or
68 .Nm stli
69 drivers will be used.  The
70 .Nm
71 and
72 .Nm stli
73 drivers can support up to 8 boards.
74 .Pp
75 Configuration of the hardware - DIP switches, jumpers, etc - varies
76 from board to board.
77 Consult documentation supplied with the board for hardware
78 configuration details.
79 Alternatively the board documentation is available on Stallion
80 Technologies WWW site at http://www.stallion.com.
81 .Pp
82 The EasyIO, EasyConnection 8/32 and EasyConnection 8/64-PCI
83 families of boards use the
84 .Nm
85 driver.
86 ISA board configuration entries for the
87 .Nm
88 driver take the general form of:
89 .Pp
90 .Cd "device stlX at isa? port <io-addr> irq <irq>"
91 .Pp
92 .Ar X
93 is the unit number assigned to the board.
94 Any unique value between 0 and 7 is valid.
95 .Pp
96 The I/O address used by the board is specified by
97 .Ar <io-addr>.
98 Each of the EasyIO and EasyConnection 8/32-AT boards can use
99 an I/O address in the range from 0 to 0x400.
100 .Pp
101 All EasyIO and EasyConnection 8/32 boards require an interrupt,
102 and this interrupt is specified by
103 .Ar <irq>.
104 Legal IRQ values for the ISA boards are 3, 4, 5, 7, 10, 11, 12 and 15.
105 Interrupts are software programmed on all boards except the EasyIO-8M.
106 .Pp
107 The EasyConnection 8/32-AT board uses a secondary I/O address region,
108 and this is fixed at address 0x280 in the driver code.
109 All EasyConnection 8/32-AT boards may share the same secondary address
110 region.
111 .Pp
112 All EasyIO and EasyConnection PCI boards are detected
113 automatically by the drivers on boot up.
114 No configuration information is required in advance for these
115 board types.
116 During boot up the
117 .Nm
118 driver will issue messages to indicate that a Stallion
119 PCI board was found, and some information about it.
120 If no ISA card is being configured, an entry like
121 .Pp
122 .Cd "device stl"
123 .Pp
124 will include the driver for PCI cards only.
125 .Pp
126 Following are some examples of configuration entries for each of the ISA
127 boards supported by the
128 .Nm
129 driver.
130 Each example also describes some important details about each of the
131 board types.
132 .Pp
133 Each EasyIO board requires 8 bytes of I/O address space and 1 IRQ line.
134 A configuration entry for an EasyIO board would look like:
135 .Pp
136 .Cd "device stl0 at isa? port 0x2a8 irq 15"
137 .Pp
138 This entry specifies an EasyIO board at I/O address 0x2a8 using IRQ 15.
139 The I/O and IRQ values can be modified as required.
140 .Pp
141 Each EasyConnection 8/32-AT board requires 2 sets of I/O addresses
142 and 1 IRQ line.
143 The primary I/O address range is 2 bytes in size, and must be unique
144 to each EasyConnection 8/32-AT board in the system.
145 The secondary I/O address range is 32 bytes in size, but can be shared
146 by multiple EasyConnection 8/32-AT boards.
147 This secondary I/O address is set at 0x280 in the driver code.
148 A configuration entry would look like:
149 .Pp
150 .Cd "device stl0 at isa? port 0x2a0 irq 10"
151 .Pp
152 This specifies an EasyConnection 8/32-AT with primary I/O address 0x2a0,
153 secondary I/O address of 0x280 and IRQ 10.
154 .Pp
155 The ONboard, Brumby and EasyConnection 8/64
156 families of boards use the
157 .Nm stli
158 driver.  The
159 .Nm stli
160 driver supports the ISA and EISA members of these families.
161 .Pp
162 ISA board configuration entries for the
163 .Nm stli
164 driver take the general form of:
165 .Pp
166 .Cd "device stliX at isa? port <io-addr> iomem <mem-addr> iosiz <size> flags <type>"
167 .Pp
168 .Ar X
169 is the unit number assigned to the board.
170 Any unique value between 0 and 7 is valid.
171 .Pp
172 The I/O address used by the board is specified by
173 .Ar <io-addr>.
174 Each of the different supported board types has restrictions on valid
175 I/O addresses and also the amount of I/O space required varies between
176 the boards.
177 .Pp
178 All boards using the
179 .Nm stli
180 driver require a shared memory region to operate.
181 Depending on the board type the region required varies in size
182 from 4 kbytes to 64 kbytes.  The size of the board region is specified
183 by field
184 .Ar <size>
185 of the configuration entry, and the address of the region is specified by
186 .Ar <mem-addr>.
187 .Pp
188 The flags field specifies the particular board type that this entry
189 applies to.
190 Not all board types are distinguishable by the driver at runtime,
191 so this field is required by the driver.
192 Valid board types are:
193 .Bd -literal -offset indent
194 BOARD NAME                      TYPE    I/O SIZE
195
196 Brumby                            2     0x4000
197 ONboard                           4     0x10000
198 ONboard/E                         7     0x10000
199 EasyConnection 8/64-AT           23     0x1000
200 EasyConnection 8/64-EISA         24     0x10000
201 .Ed
202 .Pp
203 Following are some examples of configuration entries for each of the
204 boards supported by the
205 .Nm stli
206 driver. Each example also describes some important details about
207 each of the board types.
208 .Pp
209 The EasyConnection 8/64-AT board requires 4 bytes of I/O address space and
210 4 kbytes of memory space.
211 A configuration entry would look like:
212 .Pp
213 .Cd "device stli0 at isa? port 0x2a0 iomem 0xcc000 iosiz 0x1000 flags 23"
214 .Pp
215 The flags field of this entry specifies that this is an
216 EasyConnection 8/64-AT board.
217 It is set to I/O address 0x2a0 and memory address 0xcc000.
218 The
219 .Ar iosiz
220 parameter specifies a memory region size
221 of 4 kbytes.
222 .Pp
223 The EasyConnection 8/64-EISA board requires a 64 kbyte region of
224 memory space.
225 This region can be anywhere in the 32 bit memory address space.
226 A configuration entry would be like:
227 .Pp
228 .Cd "device stli0 at eisa? port 0x2000 iomem 0x80000000 iosiz 0x10000 flags 24"
229 .Pp
230 The flags field is used to specify that this is an EasyConnection 8/64-EISA
231 board.
232 The I/O (port) address resource is derived from the EISA slot that
233 the board is in.
234 Each EISA slot is allocated a section of the I/O address space by the
235 hardware of the system.
236 That address being 0xX000 where X is the slot number.
237 The example board is at memory address 0x80000000 which is 2 Gbyte.
238 The
239 .Ar iosiz
240 parameter specifies the size of the memory region,
241 in this case 64 kbytes.
242 .Pp
243 Each ONboard ISA board requires 16 bytes of I/O space and a 64 kbyte
244 section of memory address space.
245 Valid ONboard I/O addresses are in the range 0x200 to 0x300.
246 A configuration entry for an ONboard ISA would look like:
247 .Pp
248 .Cd "device stli0 at isa? port 0x240 iomem 0xd0000 iosiz 0x10000 flags 4"
249 .Pp
250 This entry specifies an ONboard ISA by setting flags to 4.
251 It uses I/O address 0x240 and a memory region of 64 kbytes at memory
252 address 0xd0000.
253 .Pp
254 Each ONboard/E board requires a 64 kbyte memory region, and this
255 can be anywhere in the 32 bit address space (that is from 0 to 4 Gbyte).
256 A configuration entry would look like:
257 .Pp
258 .Cd "device stli0 at eisa? port 0x3000 iomem 0xc0000000 iosiz 0x10000 flags 7"
259 .Pp
260 The specifies an ONboard/E in slot 3 using a shared memory address
261 of 0xc0000000 (3 Gbyte).
262 .Pp
263 Each Brumby board requires 16 bytes of I/O address space and a 4 kbyte
264 region of shared memory space.
265 The valid Brumby I/O addresses are in the range 0x300 to 0x400.
266 The shared memory region of the Brumby must be in the 0xc0000 to
267 0xdc000 region of the memory address space.
268 A configuration entry for a Brumby would be like:
269 .Pp
270 .Cd "device stli0 at isa? port 0x360 iomem 0xc8000 iosiz 0x4000 flags 2"
271 .Pp
272 This specifies a Brumby board at I/O address 0x360 using a shared memory
273 region at address 0xc8000.
274 .Sh NOTES
275 When building the device nodes for the ports be sure to use the correct
276 driver name,
277 .Nm
278 or
279 .Nm stli .
280 Each driver has a separate major number allocated,
281 so even though the port device names are the same for each driver,
282 the major number of the device node is different.
283 Use the
284 .Xr MAKEDEV 8
285 script to create the devices.
286 Use the ttyE and cue tag for the
287 .Nm
288 driver, and
289 the ttyEi and cuei tags for the
290 .Nm stli
291 driver.
292 .Pp
293 The intelligent board types (ONboard, Brumby and
294 EasyConnection 8/64 (ISA and EISA))
295 require a firmware download before the ports will be operational.
296 This is achieved by using the
297 .Nm stlload
298 command.
299 See its manual page for details on usage.
300 .Sh FILES
301 .Bl -tag -width "/dev/staliomem?" -compact
302 .It Pa /dev/ttyE?
303 stl standard callin devices
304 .It Pa /dev/ttyiE?
305 stl initial-state callin devices
306 .It Pa /dev/ttylE?
307 stl lock-state callin devices
308 .It Pa /dev/cuaE?
309 stl standard callout devices
310 .It Pa /dev/cuaiE?
311 stl initial-state callout devices
312 .It Pa /dev/cualE?
313 stl lock-state callout devices
314 .It Pa /dev/ttyF?
315 stli standard callin devices
316 .It Pa /dev/ttyiF?
317 stli initial-state callin devices
318 .It Pa /dev/ttylF?
319 stli lock-state callin devices
320 .It Pa /dev/cuaF?
321 stli standard callout devices
322 .It Pa /dev/cuaiF?
323 stli initial-state callout devices
324 .It Pa /dev/cualF?
325 stli lock-state callout devices
326 .It Pa /dev/staliomem?
327 board control device
328 .El
329 .Pp
330 Note that the port numbers start at 0 for port 0 of board 0.
331 Each board has 64 port slots allocated for it.
332 So the second boards ports start at 64 and go through 127.
333 Use the
334 .Xr MAKEDEV 8
335 script to create the devices.
336 Use the
337 .Ar ttyEx
338 and
339 .Ar cuaEx
340 tag for the
341 .Nm
342 driver, and
343 the
344 .Ar ttyFx
345 and
346 .Ar cuaFx
347 tags for the
348 .Nm stli
349 driver, where
350 .Ar x
351 is the board number.
352 By default,
353 .Xr MAKEDEV 8
354 only creates 8 devices per board (to keep the directory size
355 reasonable).
356 To create the remaining devices for EasyConnection 8/32 and
357 EasyConnection 8/64 cards, see the comments in the
358 .Xr MAKEDEV
359 script.
360 .Sh BUGS
361 The /dev/staliomem? device name is shared between both the
362 .Nm
363 and
364 .Nm stli
365 drivers.  This may cause confusion if both drivers are present in the
366 system at the same time.
367 .Pp
368 Device names use integer suffixes, rather than the 0-9 a-z sequence
369 that other drivers use.
370 .Pp
371 There will be many unused ttyE device names in a system with more than
372 one card.
373 .Sh SEE ALSO
374 .Xr tty 4 ,
375 .Xr termios 4 ,
376 .Xr stty 1 ,
377 .Xr comcontrol 8 ,
378 .Xr stlload 8 ,
379 .Xr stlstats 8 ,
380 .Xr stlstty 8 ,
381 .Xr MAKEDEV 8
382 .Sh HISTORY
383 This driver was originally developed by Greg Ungerer (gerg@stallion.com).