Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.sbin / pccard / pccardc / pccardc.8
1 .\"
2 .\" Copyright (c) 1998 Toshihiko ARAI <toshi@jp.FreeBSD.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. The name of the author may not be used to endorse or promote products
14 .\"    derived from this software without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\"
27 .\" Translated to English by Hiroki Sato <hrs@geocities.co.jp>
28 .\"
29 .\" $FreeBSD: src/usr.sbin/pccard/pccardc/pccardc.8,v 1.7.2.6 2001/08/16 15:56:12 ru Exp $
30 .\" $DragonFly: src/usr.sbin/pccard/pccardc/Attic/pccardc.8,v 1.2 2003/06/17 04:29:59 dillon Exp $
31 .\"
32 .Dd November 14, 1998
33 .Dt PCCARDC 8
34 .Os
35 .Sh NAME
36 .Nm pccardc
37 .Nd PC-CARD (PCMCIA) management and monitoring tool
38 .Sh SYNOPSIS
39 .Nm
40 .Ar subcommand
41 .Op Ar arg ...
42 .Sh DESCRIPTION
43 .Nm
44 controls PC-CARD slots and configures and displays information about PCMCIA cards.
45 .Nm
46 understands the following subcommands:
47 .Pp
48 .Bl -tag -width pccardmem -compact
49 .It Ic beep
50 Set beep type
51 .It Ic dumpcis
52 Print card CIS(s)
53 .It Ic enabler
54 Device driver enabler
55 .It Ic help
56 Print command summary
57 .It Ic pccardmem
58 Allocate memory for pccard driver
59 .It Ic power
60 Power on/off slots
61 .It Ic rdattr
62 Read attribute memory
63 .It Ic rdmap
64 Read pcic mappings
65 .It Ic rdreg
66 Read pcic register
67 .It Ic wrattr
68 Write byte to attribute memory
69 .It Ic wrreg
70 Write pcic register
71 .El
72 .Bl -enum
73 .It
74 .Ic beep Ar beep_mode
75 .Pp
76 Specifies the sound made upon card insertion or removal.
77 This subcommand corresponds to
78 .Va pccard_beep
79 in
80 .Xr rc.conf 5 .
81 Allowed values for
82 .Ar beep_mode
83 are:
84 .Pp
85 .Bl -tag -width Ds -compact
86 .It Li 0
87 silent mode
88 .It Li 1
89 simple beep mode
90 .It Li 2
91 melody mode
92 .El
93 .It
94 .Ic dumpcis
95 .Op Ar slot
96 .Pp
97 Displays
98 .Em CIS
99 (Card Information Structure) tuple in EEPROM of a PC-CARD card.
100 .Ar Slot
101 specifies which slot to read.
102 When no option is supplied, it displays
103 the CIS of all of the available cards.
104 .It
105 .Ic enabler Ar slot driver
106 .Op Fl m Ar card addr size
107 .Op Fl a Ar iobase
108 .Op Fl i Ar irq
109 .Pp
110 This is a "point enabler" which can be used to set
111 parameters manually to enable a card when
112 .Xr pccardd 8
113 cannot allocate drivers to a PC-CARD card properly.
114 Specify a PC-CARD slot in
115 .Ar slot
116 and a device name (such as "ed0" or "sio2") in
117 .Ar driver ,
118 along with some or all of the following options:
119 .Bl -tag -width Ds
120 .It Fl m Ar card addr size
121 maps the shared-memory window of the card to host address.
122 .Ar card
123 is the starting address of shared-memory (hex) in the card's address space,
124 .Ar addr
125 is the address (hex) to map the memory to in the computer's address space, and
126 .Ar size
127 is the size of memory window (kb).
128 .It Fl a Ar iobase
129 .Ar iobase
130 specifies the port a number to be mapped to the I/O window (hex)
131 .It Fl i Ar irq
132 .Ar irq
133 specifies the IRQ (decimal from 1 to 15) the card will use for interrupts.
134 .El
135 .Pp
136 For example,
137 .Bd -literal
138         enabler 0 ed0 -m 2000 d4000 16 -a 300 -i 3
139 .Ed
140 .Pp
141 assigns the card in slot zero to the first NE2000 ethernet card driver at
142 port 0x300 and IRQ 3,
143 mapping the 16KB memory region at 0x2000 in the card to 0xd4000.
144 .Pp
145 This allows use of some unrecognized cards with broken CIS tuples,
146 and is also useful for testing a card that has not yet reported.
147 However, beware that it frequently cannot recognize new cards properly.
148 .It
149 .Ic help
150 .Pp
151 Prints help for
152 .Nm .
153 .It
154 .Ic pccardmem Ar addr
155 .Pp
156 Specifies the host address using PC-CARD controller(PCIC)
157 will use to map cards to.
158 Because the PCIC needs a contiguous 16KB memory,
159 you can only use the following four addresses:
160 .Pp
161 .Bl -tag -width 0xd0000 -compact
162 .It Ar 0xd0000
163 0xd0000-0xd3fff (default)
164 .It Ar 0xd4000
165 0xd4000-0xd7fff
166 .It Ar 0xd8000
167 0xd8000-0xdbfff
168 .It Ar 0xdc000
169 0xdc000-0xdffff
170 .El
171 .Pp
172 You can use "DEFAULT" instead of 0xd0000.
173 This subcommand corresponds to
174 .Va pccard_mem
175 in
176 .Xr rc.conf 5 .
177 .It
178 .Ic power Ar slot power_mode
179 .Pp
180 Changes the state of the power supply of the card in the specified
181 .Ar slot :
182 .Pp
183 .Bl -tag -width Ds
184 .It Li 0
185 Turn off a power supply.
186 If a card becomes unstable when it is removed at
187 activate state,
188 this can force it into inactive state first and remove it safely.
189 .It Li 1
190 Turn on a power supply and set it into active state
191 (similar to a card insertion).
192 .El
193 .Pp
194 .It
195 .Ic rdattr Ar slot offs length
196 .Pp
197 Prints a hex dump
198 .Ar length
199 bytes long of the EEPROM of the card in slot
200 .Ar slot
201 starting at
202 .Ar offs .
203 All parameters are in hex.
204 .It
205 .Ic rdmap
206 .Op Ar slot
207 .Pp
208 Displays where the four memory windows and two I/O windows of a PC-CARD slot
209 are mapped to on the host.
210 If
211 .Ar slot
212 is not supplied, it displays the information for all of slots in the system.
213 .It
214 .Ic rdreg
215 .Op Ar slot
216 .Pp
217 Displays the 64 registers of the card in
218 .Ar slot
219 (all slots by default).
220 .It
221 .Ic wrattr Ar slot offs value
222 .Pp
223 Writes a single byte to the card's EEPROM at
224 an offset address from the top specified in
225 .Ar offs
226 (hex),
227 with a value specified in
228 .Ar value
229 (hex).
230 This is preserved after the card is removed.
231 .It
232 .Ic wrreg Ar slot reg value
233 .Pp
234 Writes a register of a PC-CARD.
235 Specify a PC-CARD slot number in
236 .Ar slot ,
237 a register number in
238 .Ar reg
239 (hex) and
240 a value in
241 .Ar value
242 (hex).
243 .El
244 .Sh FILES
245 .Bl -tag -width /etc/rc.conf -compact
246 .It Pa /etc/rc.conf
247 configuration file
248 .El
249 .Sh SEE ALSO
250 .Xr rc.conf 5 ,
251 .Xr pccardd 8
252 .Sh AUTHORS
253 .An -nosplit
254 The original version was written by
255 .An Andrew McRae Aq andrew@mega.com.au .
256 .An Tatsumi Hosokawa Aq hosokawa@mt.cs.keio.ac.jp
257 fixed bugs and added some features.
258 This man page was written by
259 .An Toshihiko ARAI Aq toshi@jp.FreeBSD.org .
260 .Sh BUGS
261 Be careful when using
262 .Ic enabler
263 and
264 .Ic wrattr .
265 Misuse can make the system unstable or damage the card.