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