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