1 .\" Contributed by Niki A. Rahimi, LTC Security Development
2 .\" narahimi@us.ibm.com
3 .\" May be freely distributed.
5 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
6 .\" all rights reserved.
7 .\" Translated Sat Jun 19 17:51:11 JST 2004
8 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
10 .TH PCICONFIG_READ 2 2003-07-14 "Linux" "Linux Programmer's Manual"
13 .\"O pciconfig_read, pciconfig_write, pciconfig_iobase \- pci device information handling
14 pciconfig_read, pciconfig_write, pciconfig_iobase \- pci デバイス情報を扱う
20 .BI "int pciconfig_read(unsigned long " bus ", unsigned long " dfn ,
21 .BI " unsigned long " off ", unsigned long " len ", void *" buf );
22 .BI "int pciconfig_write(unsigned long " bus ", unsigned long " dfn ,
23 .BI " unsigned long " off ", unsigned long " len ", void *" buf );
24 .BI "int pciconfig_iobase(long " which ", unsigned long " bus ,
25 .BI " unsigned long " devfn );
30 .\"O Most of the interaction with PCI devices is already handled by the
31 .\"O kernel PCI layer,
32 .\"O and thus these calls should not normally need to be accessed from userspace.
33 PCI デバイスとのやり取り (interaction) は
34 カーネル PCI レイヤですでに処理されているので、
35 通常はこららの関数をユーザ空間からアクセスする必要はない。
53 .BR pciconfig_write ()
69 .BR pciconfig_iobase ()
70 .\"O You pass it a bus/devfn pair and get a physical address for either the
71 .\"O memory offset (for things like prep, this is 0xc0000000),
72 .\"O the IO base for PIO cycles, or the ISA holes if any.
74 .\"Osato: prep は PowerPC Reference Platform のことか。
75 .\"Osato: PIO cycles は memory offset にもかかるのか。
76 .\"Osato: if any はどこまでかかるのか。
79 メモリオフセット (prep のようなものでは、この値は 0xc0000000 である) と
80 PIO サイクルの IO ベースの物理アドレスを取得する。
81 また、もしあるならば ISA hole の物理アドレスを取得する。
82 .\"O .SH "RETURN VALUE"
86 .\"O On success zero is returned.
87 .\"O On error, \-1 is returned and
89 .\"O is set appropriately.
95 .BR pciconfig_write ()
96 .\"O On success zero is returned.
97 .\"O On error, \-1 is returned and
99 .\"O is set appropriately.
105 .BR pciconfig_iobase ()
106 .\"O Returns information on locations of various I/O
107 .\"O regions in physical memory according to the
113 .\"O .BR IOBASE_BRIDGE_NUMBER ,
114 .\"O .BR IOBASE_MEMORY ,
116 .\"O .BR IOBASE_ISA_IO ,
117 .\"O .BR IOBASE_ISA_MEM .
119 の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。
122 .BR IOBASE_BRIDGE_NUMBER ,
133 .\"O value is invalid.
134 .\"O This does not apply to
135 .\"O .BR pciconfig_iobase ().
139 .BR pciconfig_iobase ()
148 .\"O .BR pciconfig_iobase (),
149 .\"O "hose" value is NULL.
150 .\"O For the other calls, could not find a slot.
151 .BR pciconfig_iobase ()
152 の場合、でホース (hose) の値が NULL である。
153 他の呼び出しの場合、スロット (slot) が見つからない。
156 .\"O The system has not implemented these calls
157 .\"O .RB ( CONFIG_PCI
159 このシステムはこれらの呼び出しを実装していない。
164 .\"O This return value is only valid for
165 .\"O .BR pciconfig_iobase ().
167 .BR pciconfig_iobase ()
169 .\"O It is returned if the value for
177 .\"O User does not have the \fBCAP_SYS_ADMIN\fP capability.
178 .\"O This does not apply to
179 .\"O .BR pciconfig_iobase ().
184 .BR pciconfig_iobase ()
186 .\"O .SH "CONFORMING TO"
188 .\"O These calls are Linux-specific, available since Linux 2.0.26/2.1.11.
189 これらの呼び出しは Linux 特有のものであり、
190 Linux 2.0.26/2.1.11 から使用可能である。