OSDN Git Service

19f82e33e82f196111fd92055e9d6d921e5c2b2a
[linuxjm/LDP_man-pages.git] / draft / man2 / pciconfig_read.2
1 .\" Contributed by Niki A. Rahimi, LTC Security Development
2 .\" narahimi@us.ibm.com
3 .\" May be freely distributed.
4 .\"
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>
9 .\"
10 .TH PCICONFIG_READ 2 2003-07-14 "Linux" "Linux Programmer's Manual"
11 .\"O .SH NAME
12 .SH 名前
13 .\"O pciconfig_read, pciconfig_write, pciconfig_iobase \- pci device information handling
14 pciconfig_read, pciconfig_write, pciconfig_iobase \- pci デバイス情報を扱う
15 .\"O .SH SYNOPSIS
16 .SH 書式
17 .nf
18 .B #include <pci.h>
19 .sp
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 );
26 .fi
27 .\"O .SH DESCRIPTION
28 .SH 説明
29 .PP
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 通常はこららの関数をユーザ空間からアクセスする必要はない。
36 .TP
37 .BR pciconfig_read ()
38 .\"O Reads to
39 .\"O .I buf
40 .\"O from device
41 .\"O .I dev
42 .\"O at offset
43 .\"O .I off
44 .\"O value.
45 デバイス
46 .I dev
47 のオフセット
48 .I off
49 の値を
50 .I buf
51 に読み込む。
52 .TP
53 .BR pciconfig_write ()
54 .\"O Writes from
55 .\"O .I buf
56 .\"O to device
57 .\"O .I dev
58 .\"O at offset
59 .\"O .I off
60 .\"O value.
61 デバイス
62 .I dev
63 のオフセット
64 .I off
65
66 .I buf
67 の値を書き込む。
68 .TP
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.
73 .\"Osato:
74 .\"Osato: prep は PowerPC Reference Platform のことか。
75 .\"Osato: PIO cycles は memory offset にもかかるのか。
76 .\"Osato: if any はどこまでかかるのか。
77 .\"Osato:
78 bus/devfn ペアをこの関数に渡し、
79 メモリオフセット (prep のようなものでは、この値は 0xc0000000 である) と
80 PIO サイクルの IO ベースの物理アドレスを取得する。
81 また、もしあるならば ISA hole の物理アドレスを取得する。
82 .\"O .SH "RETURN VALUE"
83 .SH 返り値
84 .TP
85 .BR pciconfig_read ()
86 .\"O On success zero is returned.
87 .\"O On error, \-1 is returned and
88 .\"O .I errno
89 .\"O is set appropriately.
90 成功した場合、0 が返される。
91 エラーの場合、\-1 が返され、
92 .I errno
93 が適切に設定される。
94 .TP
95 .BR pciconfig_write ()
96 .\"O On success zero is returned.
97 .\"O On error, \-1 is returned and
98 .\"O .I errno
99 .\"O is set appropriately.
100 成功した場合、0 が返される。
101 エラーの場合、\-1 が返され、
102 .I errno
103 が適切に設定される。
104 .TP
105 .BR pciconfig_iobase ()
106 .\"O Returns information on locations of various I/O
107 .\"O regions in physical memory according to the
108 .\"O .I which
109 .\"O value.
110 .\"O Values for
111 .\"O .I which
112 .\"O are:
113 .\"O .BR IOBASE_BRIDGE_NUMBER ,
114 .\"O .BR IOBASE_MEMORY ,
115 .\"O .BR IOBASE_IO ,
116 .\"O .BR IOBASE_ISA_IO ,
117 .\"O .BR IOBASE_ISA_MEM .
118 .I which
119 の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。
120 .I which
121 の値は、
122 .BR IOBASE_BRIDGE_NUMBER ,
123 .BR IOBASE_MEMORY ,
124 .BR IOBASE_IO ,
125 .BR IOBASE_ISA_IO ,
126 .B IOBASE_ISA_MEM
127 である。
128 .\"O .SH ERRORS
129 .SH エラー
130 .TP
131 .B EINVAL
132 .\"O .I len
133 .\"O value is invalid.
134 .\"O This does not apply to
135 .\"O .BR pciconfig_iobase ().
136 .I len
137 の値が無効である。
138 このエラーは
139 .BR pciconfig_iobase ()
140 には適用されない。
141 .TP
142 .B EIO
143 .\"O I/O error.
144 I/O エラー。
145 .TP
146 .B ENODEV
147 .\"O For
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) が見つからない。
154 .TP
155 .B ENOSYS
156 .\"O The system has not implemented these calls
157 .\"O .RB ( CONFIG_PCI
158 .\"O not defined).
159 このシステムはこれらの呼び出しを実装していない。
160 .RB ( CONFIG_PCI
161 が定義されていない)。
162 .TP
163 .B EOPNOTSUPP
164 .\"O This return value is only valid for
165 .\"O .BR pciconfig_iobase ().
166 この返り値は
167 .BR pciconfig_iobase ()
168 でのみ有効である。
169 .\"O It is returned if the value for
170 .\"O .I which
171 .\"O is invalid.
172 このエラーは
173 .I which
174 の値が無効であるときに返される。
175 .TP
176 .B EPERM
177 .\"O User does not have the \fBCAP_SYS_ADMIN\fP capability.
178 .\"O This does not apply to
179 .\"O .BR pciconfig_iobase ().
180 ユーザが
181 .B CAP_SYS_ADMIN
182 権限を持っていない。
183 このエラーは
184 .BR pciconfig_iobase ()
185 には適用されない。
186 .\"O .SH "CONFORMING TO"
187 .SH 準拠
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 から使用可能である。
191 .\"O .SH "SEE ALSO"
192 .SH 関連項目
193 .BR capabilities (7)