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
|
.\"
.\" 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 FreeBSD
.Sh NAME
.Nm pccardc
.Nd PC-CARD (PCMCIA) management and monitoring tool
.Sh SYNOPSIS
.Nm pccardc Ar subcommand
.Op Ar arg ...
.Sh DESCRIPTION
.Nm
controls PC-CARD slots and configures and displays information about PCMCIA cards.
.Nm
understands the following subcommands:
.Pp
.Bl -tag -width pccardmem -compact
.It Pa beep
Set beep type
.It Pa dumpcis
Print card CIS(s)
.It Pa enabler
Device driver enabler
.It Pa help
Print command summary
.It Pa pccardmem
Allocate memory for pccard driver
.It Pa power
Power on/off slots
.It Pa rdattr
Read attribute memory
.It Pa rdmap
Read pcic mappings
.It Pa rdreg
Read pcic register
.It Pa wrattr
Write byte to attribute memory
.It Pa wrreg
Write pcic register
.El
.Bl -enum
.It
.Nm beep Ar 0|1
.Pp
Specifies the sound made upon card insertion or removal.
.Pp
.Bl -tag -width Ds -compact
.It Ar 0
silent mode
.It Ar 1
simple beep mode
.El
.It
.Nm 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
.Nm 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
.Nm help
.Pp
Prints help for
.Nm pccardc .
.It
.Nm 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,
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
.Pa pccard_mem
in
.Xr rc.conf 5 .
.It
.Nm power Ar slot 0|1
.Pp
It turns ON/OFF a power supply of a card in the slot specified in
.Ar slot .
.Pp
.Bl -tag -width Ds
.It Ar 0
turn OFF a power supply. If a card becomes unstable when it is removed at
activate state,
this can force it to turn into inactive state first and remove it safely.
.It Ar 1
turn ON a power supply and into active state similar to a card insertion.
.El
.Pp
It
.Nm 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
.Nm 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
.Nm rdreg
.Op Ar slot
.Pp
Displays the 64 registers of the card in
.Ar slot
(all slots by default).
.It
.Nm 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
.Nm 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
.Pp
.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
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
.Nm enabler
and
.Nm wrattr .
Misuse can make the system unstable or damage the card.
|