OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / pcmcia-cs / draft / man5 / pcmcia.5
1 .\" Copyright (C) 1998 David A. Hinds -- dahinds@users.sourceforge.net
2 .\" pcmcia.5 1.27 2000/10/16 16:37:38
3 .\"
4 .\" Japanese Version Copyright (c) 2000 KOJIMA Mitsuhiro and NAKANO Takeo
5 .\" all rights reserved.
6 .\" Translated Sun May 14 2000 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
7 .\" based on the draft by KOJIMA Mitsuhiro <isle@st.rim.or.jp>
8 .\" Updated Mon 12 Mar 2001 by NAKANO Takeo
9 .\"
10 .TH PCMCIA 5 "2000/10/16 16:37:38" "pcmcia-cs"
11 .\"O .SH NAME
12 .\"O /etc/pcmcia/config \- PCMCIA card configuration database
13 .SH 名前
14 /etc/pcmcia/config \- PCMCIA カードの設定データベース
15 .\"O 
16 .\"O .SH DESCRIPTION
17 .SH 説明
18 .\"O The PCMCIA card configuration file is read by \fIcardmgr\fR(8)
19 .\"O at startup time.  It defines what resources are available for use by
20 .\"O Card Services, describes how to load and initialize device drivers,
21 .\"O and describes specific PCMCIA cards.
22 PCMCIA カード設定ファイルは
23 .BR cardmgr (8)
24 が起動時に読み込む。
25 この設定ファイルは、カードサービスが利用できる
26 IO ポート・メモリ・IRQ といったリソースを定義し、
27 デバイスドライバのロードや初期化の方法を指定し、
28 それぞれの PCMCIA カードの詳細について記述する。
29 .\"O 
30 .\"O .SH Resource descriptions
31 .SH リソースの記述
32 .\"O There are three kinds of resource entries: \fBinclude\fR,
33 .\"O \fBexclude\fR, and \fBreserve\fR. Including a resource enables Card
34 .\"O Services to allocate that resource for client drivers.  Part of a
35 .\"O resource that is under Card Services control can be excluded if a
36 .\"O specific device in the system uses that resource.  And, a resource can
37 .\"O be reserved, so that it will only be assigned to a client if that
38 .\"O client specifically asks for that resource, or no other suitable
39 .\"O resources are available.
40 リソースのエントリには 3 つの種類がある。
41 .BR include ,
42 .BR exclude ,
43 .B reserve
44 である。
45 include したリソースは、
46 カードサービスがクライアントとなる各種ドライバに割り当てる。
47 カードサービスの制御下にあるリソースは exclude することもできる。
48 例えばシステムの特定のデバイスがそのリソースを使うような場合である。
49 リソースは reserve することもできる。
50 この場合は、そのリソースを特に使いたいと要求するクライアントが現われるか、
51 あるいは他に割り当て可能なリソースが無くなるまで、
52 そのリソースは割り当てない。
53 .PP
54 .\"O There are three resource types: \fBport\fR, \fBmemory\fR, and
55 .\"O \fBirq\fR. By default, Card Services assumes that it can use any
56 .\"O interrupt that is not bound by another device driver.  However, it
57 .\"O makes no assumptions about IO port and address ranges, because some
58 .\"O Linux drivers do not register their resource usage.  So, port and
59 .\"O memory ranges must be explicitly made available for use by PCMCIA
60 .\"O devices.
61 リソースのタイプには 3 つの種類がある。
62 .BR port ,
63 .BR memory ,
64 .B irq
65 である。
66 デフォルトでは、カードサービスは他のデバイスドライバが使っていない
67 irq を自由に使えるものと仮定する。
68 しかし、カードサービスは I/O ポートとアドレスの範囲に関しては
69 なんの仮定も行わない。 Linux のドライバの中には
70 リソースの利用状況を登録しない物があるからである。
71 そのため、
72 IO ポートとメモリの範囲については、
73 PCMCIA デバイスが使って良い部分を明示的に指定しなければならない。
74 .PP
75 .\"O So, here is a portion of a config file:
76 これらをまとめると、設定ファイルの内容は以下のようになる:
77 .sp
78 .RS
79 .nf
80 include port 0x300-0x3ff, memory 0xd0000-0xdffff
81 reserve irq 3
82 exclude irq 4, port 0x3f8-0x3ff
83 .RE
84 .fi
85 .sp
86 .\"O This says that Card Services can allocate ports in the range 0x300 to
87 .\"O 0x3ff, and memory in the range 0xd0000 to 0xdffff.  It should not use
88 .\"O irq 4 or ports 0x3f8-0x3ff (even if they seem to be available).  And
89 .\"O irq 3 should only be allocated if a client specifically asks for it.
90 この例では、カードサービスは I/O ポートの 0x300 から
91 0x3ff と、メモリの 0xd0000  から 0xdffff までを割り当てて良いことになる。
92 exclude 指定をした irq 4 と I/O ポートの 0x3f8 から 0x3ff は、
93 利用可能であっても使わない。
94 reserve 指定した irq 3 は、
95 特にその割り込みをクライアントが必要とした場合に限って利用する。
96 .PP
97 .\"O Card Services will never allocate resources already allocated by
98 .\"O another kernel device driver.  The
99 .\"O .BR include / exclude / reserve
100 .\"O mechanism just provides a way of controlling what resources it will
101 .\"O try to use, to accomodate devices that are not registered with the
102 .\"O Linux resource manager.
103 カードサービスは、他のカーネルデバイスドライバに割り当てられている
104 リソースは決して利用しない。
105 .BR include / exclude / reserve
106 メカニズムは、カードサービスが使おうと試みるリソースを指定するもので、
107 Linux のリソースマネージャーに登録されないデバイスと
108 うまく共存するための仕組みなのである。
109 .\"kojima [註 釈:かってリソースの指定は /etc/pcmcia/config の最初に
110 .\"kojima ありましたが、現在のバージョンでは /etc/pcmcia/config.opts
111 .\"kojima と して独立しています。/etc/pcmcia/config は新しくサポート
112 .\"kojima されたカードが増えるたびに書きかえられ ま す が、/etc/pcm-
113 .\"kojima cia/config.opts は書きかわらないので、システムに依存する記
114 .\"kojima 述は *.opts ファイルにまとめるようになりました。]
115 .\"O 
116 .\"O .SH Device driver descriptions
117 .SH デバイスドライバの記述
118 .\"O All Card Services client drivers are identified by a 32-character tag.
119 .\"O \fBDevice\fR entries in the config file describe client drivers.  The only
120 .\"O required field is the device tag.  Additional fields can specify
121 .\"O kernel modules that need to be loaded to make the device available,
122 .\"O and a script to be executed to enable and disable instances of
123 .\"O a device.  When an instance of a driver is assigned to a socket, it
124 .\"O gives cardmgr a device name by which this device will be known by the
125 .\"O system (for example, \fIeth0\fR for a net device, or \fIcua1\fR for a
126 .\"O modem).  This name will be passed to the configuration script.  For
127 .\"O example:
128 カードサービスの全てのクライアントドライバは、
129 32 文字のタグによって識別される。
130 設定ファイル中の
131 .B device
132 エントリがクライアントドライバを記述する。
133 必須のフィールドは識別用のタグのみで、
134 その他のフィールドには、
135 そのデバイスを利用するためにロードすべきカーネルモジュールや
136 デバイスの実体を有効/無効するために実行するスクリプトを指定する。
137 ドライバの実体がソケットに割り当てられると、
138 ドライバは cardmgr にシステムから見たそのデバイスの名称
139 (ネットワークデバイスならば
140 .IR eth0 、
141 モデムならば
142 .I cua1
143 など)
144 を通知する。
145 この名称は設定用スクリプトに渡される。例えば:
146 .sp
147 .RS
148 .nf
149 device "pcnet_cs"
150   class "network"
151   module "net/8390" opts "ei_debug=4", "pcnet_cs"
152 .RE
153 .fi
154 .sp
155 .\"O This says that the \fBpcnet_cs\fR device requires two loadable modules.
156 .\"O The first one is located in the \fInet\fR module subdirectory and will
157 .\"O be loaded with a specific parameter setting.  The second module should
158 .\"O be in the \fIpcmcia\fR module subdirectory.  The device is in the
159 .\"O network class, so the \fInetwork\fR script in the configuration
160 .\"O directory will be used to start or stop the device.
161 という指定では、
162 .B pcnet_cs
163 デバイスは 2 つのローダブルモジュールが必要であることを示している。
164 1 つめのモジュール (8390) はモジュールディレクトリの
165 .I net
166 サブディレクトリにあり、指定したパラメータ
167 .I ei_debug=4
168 と共にロードされる。
169 2 つめのモジュール (de650_cs) は
170 .I pcmcia
171 サブディレクトリにある。
172 このデバイス (pcnet_cs) は
173 .I network
174 というクラスに属し、デバイスの起動と終了には、
175 設定ファイルと同じディレクトリにある
176 .I network スクリプト (/etc/pcmcia/network) が利用される。
177 .PP
178 .\"O It is also possible to specify default options for a particular kernel
179 .\"O module, outside of a device driver declaration.  This is convenient
180 .\"O for keeping local configuration options in a file separate from the
181 .\"O main card configuration file.  For example:
182 デバイスドライバ宣言の外部で、
183 特定のカーネルモジュールのデフォルトのオプションを指定することもできる。
184 これはローカルな設定オプションを
185 メインのカード設定ファイルから分離するのに便利である。
186 .\"kojima 各デバイスの設定用スクリプトはデバイスの初期化と終了の際に
187 .\"kojima 起動されますが、それ以外にも、サスペンド時にそのデバイスが
188 .\"kojima 現在使用中かどうかを確認したり、レジュームの際にデバイスを
189 .\"kojima 再設定したりするのにも使われます。 cardmgr は設定用スク リ
190 .\"kojima プトをいくつかの引数を指定して起動します。引数として指定さ
191 .\"kojima れるのは「取るべき動作」と「デバイス名」で、可能ならば「デ
192 .\"kojima バイス番号(major/minor)」も指定します。
193 .sp
194 .RS
195 .nf
196 module "pcnet_cs" opts "mem_speed=600"
197 .RE
198 .fi
199 .sp
200 .\"O 
201 .\"O .SH Card descriptions
202 .SH カードの記述
203 .\"O Card declarations map PCMCIA cards to their client drivers.  A card
204 .\"O declaration consists of a descriptive name, a method for identifying
205 .\"O the card when it is inserted, and driver bindings.  There are six
206 .\"O identification methods: the \fBversion\fR method matches a card using
207 .\"O its VERSION_1 id strings, the \fBmanfid\fR method matches a card using
208 .\"O its MANFID tuple codes, the \fBpci\fR method matches a CardBus card
209 .\"O using its PCI device ID's, the \fBtuple\fR method matches a card using
210 .\"O any string embedded in any arbitrary CIS tuple, the \fBfunction\fR
211 .\"O method matches a card using its function ID, and the \fBanonymous\fR
212 .\"O method matches any card that does not have a CIS.  This last method
213 .\"O is only intended to be used for old-style Type I memory cards.  For
214 .\"O example:
215 card 宣言は、PCMCIA カードとそのクライアントドライバとを
216 結びつけるものである。
217 card 宣言は、カードの名称・カードが挿入された際の識別方法・
218 利用するドライバ、の 3 つの部分からなる。
219 カードを識別するには 6 つのメソッド (方法) がある。
220 .B version
221 メソッドはカード識別に VERSION_1 id 文字列を用いる。
222 .B manfid
223 メソッドはカードの MANFID タプルコードを用いる。
224 .B pci
225 メソッドは CardBus カードの PCI デバイス ID を用いる。
226 .B tuple
227 メソッドはカードの任意の CIS タプルに埋めこまれた文字列を用いる。
228 .B function
229 メソッドはカードの function ID を用いる。
230 .B anonymous
231 メソッドは CIS を持たないカードにマッチする
232 (これは旧式のタイプ I メモリカードに用いる物である)。
233 以下にいくつか例を示す。
234 .sp
235 .RS
236 .nf
237 card "Linksys Ethernet Card"
238   tuple 0x40, 0x0009, "E-CARD PC Ethernet Card"
239   bind "pcnet_cs"
240 .RE
241 .fi
242 .sp
243 .\"O This card is identified by a string at offset 0x0009 in tuple 0x40,
244 .\"O and will be bound to the \fBpcnet_cs\fR driver (which must be already
245 .\"O declared in a \fBdriver\fR declaration).
246 このカードは 0x40 タプルのオフセット 0x0009 から始まる
247 文字列 "E-CARD PC Ethernet Card" によって識別され、
248 .B pcnet_cs
249 ドライバにバインドされる
250 (ドライバはあらかじめ
251 .B driver
252 宣言で定義されていなければならない)。
253 .sp
254 .RS
255 .nf
256 card "Connectware LANdingGear Adapter"
257   manfid 0x0057, 0x1004
258   bind "pcnet_cs"
259 .RE
260 .fi
261 .sp
262 .\"O This card is identified by its MANFID tuple contents.  The \fBpci\fR
263 .\"O method has the same form, with \fBpci\fR replacing \fBmanfid\fR.
264 このカードは MANFID タプルの内容によって識別される。
265 .B pci
266 メソッドも同じ形式で、
267 .B manfid
268 の代わりに
269 .B pci
270 と書く。
271 .sp
272 .RS
273 .nf
274 card "D-Link DE-650 Ethernet Card"
275   version "D-Link", "DE-650"
276   bind "pcnet_cs"
277 .RE
278 .fi
279 .sp
280 .\"O This card will be identified using its VERSION_1 tuple, and will also
281 .\"O be bound to the \fBpcnet_cs\fR driver.
282 このカードは VERISON_1 タプルによって識別され、
283 .B pcnet_cs
284 ドライバにバインドされる。
285 .sp
286 .RS
287 .nf
288 card "Serial port device"
289   function serial_port
290   bind "serial_cs"
291 .RE
292 .fi
293 .sp
294 .\"O This binds the \fBserial_cs\fR driver to any card with a CIS function
295 .\"O ID of 0x02, which corresponds to a serial port card.  The function ID
296 .\"O can either be a number, or one of the following predefined functions:
297 .\"O \fBmemory_card\fR, \fBserial_port\fR, \fBparallel_port\fR,
298 .\"O \fBfixed_disk\fR, \fBvideo_adapter\fR, \fBnetwork_adapter\fR, and
299 .\"O \fBaims_card\fR.
300 これは CIS function ID が 0x02 (シリアルポートカードに対応)
301 のあらゆるカードを
302 .B serial_cs
303 ドライバにバインドする。
304 function ID は数字でも良いし、定義済みの function である
305 .BR memory_card ,
306 .BR serial_port ,
307 .BR parallel_port ,
308 .BR fixed_disk ,
309 .BR video_adapter ,
310 .BR network_adapter ,
311 .BR aims_card
312 のいずれかでもかまわない。
313 .PP
314 .\"O Finally, the configuration file can specify that Card Services should
315 .\"O use a replacement for the configuration information found on a card.
316 .\"O This can be useful if a card's configuration information is
317 .\"O particularly incomplete or inaccurate.  The new information is read
318 .\"O from a file as in this example:
319 最後に、カードで見付かった設定情報とは異なるものを
320 カードサービスに用いさせるような指定も設定ファイルでは可能である。
321 カードの設定情報が特に不完全・不正確である場合にこれを使えることもある。
322 新しい設定はファイルから読み込む。例を示す:
323 .sp
324 .RS
325 .nf
326 card "Evil broken card"
327   manfid 0x1234, 0x5678
328   cis "fixup.cis"
329   bind "serial_cs"
330 .RE
331 .fi
332 .sp
333 .\"O 
334 .\"O .SH Memory region definitions 
335 .SH メモリ領域定義
336 .\"O Memory region definitions are used to associate a particular type of
337 .\"O memory device with a Memory Technology Driver, or "MTD".  An MTD is
338 .\"O used to service memory accesses in a device-independent fashion.  When
339 .\"O a card is identified, Card Services will attempt to load MTD's for all
340 .\"O its memory regions.
341 メモリ領域定義は、特定の形式のメモリデバイスを
342 Memory Technology Driver (MTD) に関連付けするために用いられる。
343 MTD はメモリアクセスを、デバイス独立なやり方で提供する。
344 カードがこの種のメモリデバイスであると識別されると、
345 カードサービスはそのメモリ領域全てに対して MTD を読み込もうとする。
346 .PP
347 .\"O A memory region definition begins with the \fBregion\fR keyword and a
348 .\"O descriptive string.  This is followed by an identification method:
349 .\"O either \fBdefault\fR to identify an MTD to be used for any otherwise
350 .\"O unclassified region, or \fBjedec\fR to identify a region based on its
351 .\"O JEDEC identification codes.  Thus, for example,
352 メモリ領域定義は
353 .B region
354 キーワードと識別文字列から始まる。
355 次に識別メソッドである
356 .BR default " か " jedec
357 が来る。
358 .B default
359 は他に分類されなかったすべての領域で使う MTD を指定し、
360 .B jedec
361 はメモリ領域を JEDEC の識別コードによって識別する。
362 例えば
363 .sp
364 .RS
365 .nf
366 region "Intel Series 2 Flash"
367   jedec 0x89 0xa2
368   mtd "iflash2_mtd"
369 .RE
370 .fi
371 .sp
372 .\"O specifies that the \fBiflash2_mtd\fR driver will be loaded based on a
373 .\"O JEDEC match.
374 は、 JEDEC がマッチすれば
375 .B iflash_mtd
376 ドライバがロードされることを示している。
377 .\"O 
378 .\"O .SH BUGS
379 .SH バグ 
380 .\"O The \fBreserve\fR keyword has not actually been implemented in a
381 .\"O useful way for this version of Card Services.
382 今のところ
383 .B reserve
384 キーワードの実装はこのバージョンのカードサービスにはあまり便利でない。
385 .\"O .SH AUTHOR
386 .SH 著者
387 David Hinds \- dahinds@users.sourceforge.net
388 .\"O .SH "SEE ALSO"
389 .SH 関連項目
390 .\"O cardmgr(8).
391 .BR cardmgr (8)
392