OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / release / 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 .SH 名前
12 pciconfig_read, pciconfig_write, pciconfig_iobase \- pci デバイス情報を扱う
13 .SH 書式
14 .nf
15 .B #include <pci.h>
16 .sp
17 .BI "int pciconfig_read(unsigned long " bus ", unsigned long " dfn ,
18 .BI "          unsigned long " off ", unsigned long " len ", void *" buf );
19 .BI "int pciconfig_write(unsigned long " bus ", unsigned long " dfn ,
20 .BI "          unsigned long " off ", unsigned long " len ", void *" buf );
21 .BI "int pciconfig_iobase(long " which ", unsigned long " bus ,
22 .BI "          unsigned long " devfn );
23 .fi
24 .SH 説明
25 .PP
26 PCI デバイスとのやり取り (interaction) は
27 カーネル PCI レイヤですでに処理されているので、
28 通常はこららの関数をユーザ空間からアクセスする必要はない。
29 .TP
30 .BR pciconfig_read ()
31 デバイス
32 .I dev
33 のオフセット
34 .I off
35 の値を
36 .I buf
37 に読み込む。
38 .TP
39 .BR pciconfig_write ()
40 デバイス
41 .I dev
42 のオフセット
43 .I off
44
45 .I buf
46 の値を書き込む。
47 .TP
48 .BR pciconfig_iobase ()
49 bus/devfn ペアをこの関数に渡し、
50 メモリオフセット (prep のようなものでは、この値は 0xc0000000 である) と
51 PIO サイクルの IO ベースの物理アドレスを取得する。
52 また、もしあるならば ISA hole の物理アドレスを取得する。
53 .SH 返り値
54 .TP
55 .BR pciconfig_read ()
56 成功した場合、0 が返される。
57 エラーの場合、\-1 が返され、
58 .I errno
59 が適切に設定される。
60 .TP
61 .BR pciconfig_write ()
62 成功した場合、0 が返される。
63 エラーの場合、\-1 が返され、
64 .I errno
65 が適切に設定される。
66 .TP
67 .BR pciconfig_iobase ()
68 .I which
69 の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。
70 .I which
71 の値は、
72 .BR IOBASE_BRIDGE_NUMBER ,
73 .BR IOBASE_MEMORY ,
74 .BR IOBASE_IO ,
75 .BR IOBASE_ISA_IO ,
76 .B IOBASE_ISA_MEM
77 である。
78 .SH エラー
79 .TP
80 .B EINVAL
81 .I len
82 の値が無効である。
83 このエラーは
84 .BR pciconfig_iobase ()
85 には適用されない。
86 .TP
87 .B EIO
88 I/O エラー。
89 .TP
90 .B ENODEV
91 .BR pciconfig_iobase ()
92 の場合、でホース (hose) の値が NULL である。
93 他の呼び出しの場合、スロット (slot) が見つからない。
94 .TP
95 .B ENOSYS
96 このシステムはこれらの呼び出しを実装していない。
97 .RB ( CONFIG_PCI
98 が定義されていない)。
99 .TP
100 .B EOPNOTSUPP
101 この返り値は
102 .BR pciconfig_iobase ()
103 でのみ有効である。
104 このエラーは
105 .I which
106 の値が無効であるときに返される。
107 .TP
108 .B EPERM
109 ユーザが
110 .B CAP_SYS_ADMIN
111 権限を持っていない。
112 このエラーは
113 .BR pciconfig_iobase ()
114 には適用されない。
115 .SH 準拠
116 これらの呼び出しは Linux 特有のものであり、
117 Linux 2.0.26/2.1.11 から使用可能である。
118 .SH 関連項目
119 .BR capabilities (7)