OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[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)