2 .\" Copyright (c) 1994 Andrew McRae. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. The name of the author may not be used to endorse or promote products
13 .\" derived from this software without specific prior written permission.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\" $FreeBSD: src/usr.sbin/pccard/pccardd/pccard.conf.5,v 1.12.2.10 2002/04/07 04:57:14 dd Exp $
27 .\" $DragonFly: src/usr.sbin/pccard/pccardd/Attic/pccard.conf.5,v 1.2 2003/06/17 04:29:59 dillon Exp $
40 file is the configuration file for the
42 PC-CARD slot management daemon.
43 It provides information to allow card
44 identification, and the matching of drivers (along
45 with driver resources) to the PC-CARD cards.
47 There are four basic elements within the configuration file;
50 preceding the other sections,
52 .Em "card identifiers" ,
54 .Em "device instances" .
55 The latter two may appear in any order, and may be
56 interspersed as desired.
60 file is included from the file
61 .Pa /etc/defaults/pccard.conf ,
62 which contains the default resource pool settings and
63 pccard identifiers database.
64 The user specific configuration can be specified in
66 when the user wishes to override these defaults and/or
67 add additional entries.
69 Each PC-CARD card contains configuration tuples that provide
70 the manufacturer and card version; these are used
71 to identify the card specification in the configuration
72 file, and from this find a driver that can be used to
73 interface to the particular card.
74 There is a many-to-one mapping
75 between cards to drivers i.e a single driver may interface to
76 multiple types of cards.
77 To aid this, card parameters may be
78 specified separately from the driver to initialize the card or
79 extract (in the case of a network card) an Ethernet address.
81 Once a driver is allocated to a card, it stays
82 allocated to that particular card.
83 However, multiple instances of the same type of driver can be
84 configured, so that if two cards are plugged in that map to a
85 similar type of driver, other driver instances of the same name
92 commands allow a shell command line to be executed.
93 The command to be executed is the rest of the line after
95 The line can be continued using a backslash.
97 macro substitution allows the current kernel device name
100 network card Ethernet address
102 to be inserted into the command line.
106 subroutine to execute the command line.
109 will use syslog to announce the insertion and removal of cards.
110 It uses either the string set by the
112 command, or the manufacturer and card version strings if none has
115 Numeric values may be expressed as octal, hex or decimal.
116 If a decimal number has
120 appended to it, the value is multiplied by 1024. Names may be
121 quoted using double quotes if spaces are required.
122 A hash character comments out the rest of the line.
124 The (optional) section specifies a pool of system resources
125 such as ISA bus memory address space, Input/Output ports and
126 interrupt request numbers.
127 This resource pool is used
128 to allocate address space and interrupt numbers dynamically
129 according to the requirements specified in each driver
132 The syntax of the resources is as follows:
134 .Dl io Ar start - end ...
135 .Dl memory Ar address size ...
136 .Dl irq Ar irq-number ...
138 Each of the statements define I/O, memory or IRQ
139 blocks that can be used to allocate to drivers when
140 they are initialized.
142 The syntax of the debuglevel parameter:
144 .Dl debuglevel Ar level
146 Multiple lines of any of the above statements may be
147 present to allow separate blocks of each resource to be
149 .Ss "Card Identifiers"
150 The syntax for card identifiers is:
152 .Dl card Ar manufacturer version [ add_info1 [ add_info2 ]]
153 .Dl config Ar index driver interrupt [ flags ]
158 .Dl insert Ar command
159 .Dl remove Ar command
162 The first line is mandatory;
163 the latter statements are optional and can appear in
165 There may be multiple
170 parameters are the Manufacturer name, card version and
171 additional information add_info1, add_info2 that
172 is used to match the values from the card's CIS memory.
173 These parameter can be described in extended regular expression
175 if the string is enclosed by '/' like "/.*/".
176 Each of the expressions is evaluated with a character '^' at top.
180 parameters select the particular card's configuration index
181 from the range available in the card's CIS, the driver that
182 is to be associated with this configuration, and the interrupt
183 level (if any) to be assigned.
184 An optional set of flags may
188 specify either ``auto'' or ``default'' or the range available in the card's CIS.
189 ``auto'' allows to allocate resources automatically with information
190 from the CIS and status of using I/O resources.
194 keyword is used when network cards have their physical Ethernet address
195 located within the attribute memory of the card.
196 The parameter of this
197 statement indicates the offset within the attribute memory of the
199 This value can be used within insert/remove
206 keyword specifies reset duration at a card insertion in
214 keywords are used with cards whose resources such as I/O ports and
215 shared memory block are not specified in the CIS tuple.
221 sections allow shell commands to be specified that are executed
222 when the card is inserted or removed.
227 commands are allowed, and they are executed in the order they
232 command allows the user to set the string to be logged when this card is
236 isn't specified, then the manufacturer and
237 card version strings from the CIS are used to synthesize the string issued.
238 .Ss "Wildcard entries"
239 Following two wildcard entries of card identifiers are available
240 for generic type of the cards:
243 .Dl generic fixed_disk
247 matches ``Functional ID: Serial port/modem'' and
249 matches ``Fixed disk card''.
250 The syntax is the same of
251 .Em "card identifiers"
252 but used ``generic'' instead of ``card'' in the first line.
253 These are in the last of
255 because unmatched cards with the other
257 entries can match these entries secondly.
258 The alias ``function'' can be used instead of ``generic'' because of
259 the historical reason.
261 A typical configuration file may appear thus:
264 # Sample configuration file.
268 io 0x280 - 0x2F0 0x300 - 0x360
275 card "RPTI LTD." "EP400" # NE2000 clone
278 insert ifconfig $device physical $ether
279 insert ifconfig $device bean
280 remove ifconfig $device down
282 card "XYZZY" "FAX/1.0"
283 config 0x30 "sio1" 11
284 insert echo start getty
285 remove echo stop getty
289 .Bl -tag -width /etc/defaults/pccard.conf -compact
290 .It Pa /etc/defaults/pccard.conf
293 default configuration file.
294 .It Pa /etc/pccard.conf
296 user configuration file.