Initial import from FreeBSD RELENG_4:
[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 .\"
31 .Dd November 14, 1998
32 .Dt PCCARDC 8
33 .Os
34 .Sh NAME
35 .Nm pccardc
36 .Nd PC-CARD (PCMCIA) management and monitoring tool
37 .Sh SYNOPSIS
38 .Nm
39 .Ar subcommand
40 .Op Ar arg ...
41 .Sh DESCRIPTION
42 .Nm
43 controls PC-CARD slots and configures and displays information about PCMCIA cards.
44 .Nm
45 understands the following subcommands:
46 .Pp
47 .Bl -tag -width pccardmem -compact
48 .It Ic beep
49 Set beep type
50 .It Ic dumpcis
51 Print card CIS(s)
52 .It Ic enabler
53 Device driver enabler
54 .It Ic help
55 Print command summary
56 .It Ic pccardmem
57 Allocate memory for pccard driver
58 .It Ic power
59 Power on/off slots
60 .It Ic rdattr
61 Read attribute memory
62 .It Ic rdmap
63 Read pcic mappings
64 .It Ic rdreg
65 Read pcic register
66 .It Ic wrattr
67 Write byte to attribute memory
68 .It Ic wrreg
69 Write pcic register
70 .El
71 .Bl -enum
72 .It
73 .Ic beep Ar beep_mode
74 .Pp
75 Specifies the sound made upon card insertion or removal.
76 This subcommand corresponds to
77 .Va pccard_beep
78 in
79 .Xr rc.conf 5 .
80 Allowed values for
81 .Ar beep_mode
82 are:
83 .Pp
84 .Bl -tag -width Ds -compact
85 .It Li 0
86 silent mode
87 .It Li 1
88 simple beep mode
89 .It Li 2
90 melody mode
91 .El
92 .It
93 .Ic dumpcis
94 .Op Ar slot
95 .Pp
96 Displays
97 .Em CIS
98 (Card Information Structure) tuple in EEPROM of a PC-CARD card.
99 .Ar Slot
100 specifies which slot to read.
101 When no option is supplied, it displays
102 the CIS of all of the available cards.
103 .It
104 .Ic enabler Ar slot driver
105 .Op Fl m Ar card addr size
106 .Op Fl a Ar iobase
107 .Op Fl i Ar irq
108 .Pp
109 This is a "point enabler" which can be used to set
110 parameters manually to enable a card when
111 .Xr pccardd 8
112 cannot allocate drivers to a PC-CARD card properly.
113 Specify a PC-CARD slot in
114 .Ar slot
115 and a device name (such as "ed0" or "sio2") in
116 .Ar driver ,
117 along with some or all of the following options:
118 .Bl -tag -width Ds
119 .It Fl m Ar card addr size
120 maps the shared-memory window of the card to host address.
121 .Ar card
122 is the starting address of shared-memory (hex) in the card's address space,
123 .Ar addr
124 is the address (hex) to map the memory to in the computer's address space, and
125 .Ar size
126 is the size of memory window (kb).
127 .It Fl a Ar iobase
128 .Ar iobase
129 specifies the port a number to be mapped to the I/O window (hex)
130 .It Fl i Ar irq
131 .Ar irq
132 specifies the IRQ (decimal from 1 to 15) the card will use for interrupts.
133 .El
134 .Pp
135 For example,
136 .Bd -literal
137         enabler 0 ed0 -m 2000 d4000 16 -a 300 -i 3
138 .Ed
139 .Pp
140 assigns the card in slot zero to the first NE2000 ethernet card driver at
141 port 0x300 and IRQ 3,
142 mapping the 16KB memory region at 0x2000 in the card to 0xd4000.
143 .Pp
144 This allows use of some unrecognized cards with broken CIS tuples,
145 and is also useful for testing a card that has not yet reported.
146 However, beware that it frequently cannot recognize new cards properly.
147 .It
148 .Ic help
149 .Pp
150 Prints help for
151 .Nm .
152 .It
153 .Ic pccardmem Ar addr
154 .Pp
155 Specifies the host address using PC-CARD controller(PCIC)
156 will use to map cards to.
157 Because the PCIC needs a contiguous 16KB memory,
158 you can only use the following four addresses:
159 .Pp
160 .Bl -tag -width 0xd0000 -compact
161 .It Ar 0xd0000
162 0xd0000-0xd3fff (default)
163 .It Ar 0xd4000
164 0xd4000-0xd7fff
165 .It Ar 0xd8000
166 0xd8000-0xdbfff
167 .It Ar 0xdc000
168 0xdc000-0xdffff
169 .El
170 .Pp
171 You can use "DEFAULT" instead of 0xd0000.
172 This subcommand corresponds to
173 .Va pccard_mem
174 in
175 .Xr rc.conf 5 .
176 .It
177 .Ic power Ar slot power_mode
178 .Pp
179 Changes the state of the power supply of the card in the specified
180 .Ar slot :
181 .Pp
182 .Bl -tag -width Ds
183 .It Li 0
184 Turn off a power supply.
185 If a card becomes unstable when it is removed at
186 activate state,
187 this can force it into inactive state first and remove it safely.
188 .It Li 1
189 Turn on a power supply and set it into active state
190 (similar to a card insertion).
191 .El
192 .Pp
193 .It
194 .Ic rdattr Ar slot offs length
195 .Pp
196 Prints a hex dump
197 .Ar length
198 bytes long of the EEPROM of the card in slot
199 .Ar slot
200 starting at
201 .Ar offs .
202 All parameters are in hex.
203 .It
204 .Ic rdmap
205 .Op Ar slot
206 .Pp
207 Displays where the four memory windows and two I/O windows of a PC-CARD slot
208 are mapped to on the host.
209 If
210 .Ar slot
211 is not supplied, it displays the information for all of slots in the system.
212 .It
213 .Ic rdreg
214 .Op Ar slot
215 .Pp
216 Displays the 64 registers of the card in
217 .Ar slot
218 (all slots by default).
219 .It
220 .Ic wrattr Ar slot offs value
221 .Pp
222 Writes a single byte to the card's EEPROM at
223 an offset address from the top specified in
224 .Ar offs
225 (hex),
226 with a value specified in
227 .Ar value
228 (hex).
229 This is preserved after the card is removed.
230 .It
231 .Ic wrreg Ar slot reg value
232 .Pp
233 Writes a register of a PC-CARD.
234 Specify a PC-CARD slot number in
235 .Ar slot ,
236 a register number in
237 .Ar reg
238 (hex) and
239 a value in
240 .Ar value
241 (hex).
242 .El
243 .Sh FILES
244 .Bl -tag -width /etc/rc.conf -compact
245 .It Pa /etc/rc.conf
246 configuration file
247 .El
248 .Sh SEE ALSO
249 .Xr rc.conf 5 ,
250 .Xr pccardd 8
251 .Sh AUTHORS
252 .An -nosplit
253 The original version was written by
254 .An Andrew McRae Aq andrew@mega.com.au .
255 .An Tatsumi Hosokawa Aq hosokawa@mt.cs.keio.ac.jp
256 fixed bugs and added some features.
257 This man page was written by
258 .An Toshihiko ARAI Aq toshi@jp.FreeBSD.org .
259 .Sh BUGS
260 Be careful when using
261 .Ic enabler
262 and
263 .Ic wrattr .
264 Misuse can make the system unstable or damage the card.