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 ¤Ï¤É¤³¤Þ¤Ç¤«¤«¤ë¤Î¤«¡£
78 bus/devfn ¥Ú¥¢¤ò¤³¤Î´Ø¿ô¤ËÅϤ·¡¢
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.
90 À®¸ù¤·¤¿¾ì¹ç¡¢0 ¤¬ÊÖ¤µ¤ì¤ë¡£
91 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¡¢
95 .BR pciconfig_write ()
96 .\"O On success zero is returned.
97 .\"O On error, \-1 is returned and
99 .\"O is set appropriately.
100 À®¸ù¤·¤¿¾ì¹ç¡¢0 ¤¬ÊÖ¤µ¤ì¤ë¡£
101 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¡¢
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 ¤³¤Î¥·¥¹¥Æ¥à¤Ï¤³¤ì¤é¤Î¸Æ¤Ó½Ð¤·¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¡£
161 ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤)¡£
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
174 ¤ÎÃͤ¬Ìµ¸ú¤Ç¤¢¤ë¤È¤¤ËÊÖ¤µ¤ì¤ë¡£
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 ¤«¤é»ÈÍѲÄǽ¤Ç¤¢¤ë¡£