1 .\" Contributed by Niki A. Rahimi, LTC Security Development
2 .\" narahimi@us.ibm.com
4 .\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
5 .\" May be freely distributed.
8 .\"*******************************************************************
10 .\" This file was generated with po4a. Translate the source file.
12 .\"*******************************************************************
13 .TH PCICONFIG_READ 2 2003\-07\-14 Linux "Linux Programmer's Manual"
15 pciconfig_read, pciconfig_write, pciconfig_iobase \- pci デバイス情報を扱う
18 \fB#include <pci.h>\fP
20 \fBint pciconfig_read(unsigned long \fP\fIbus\fP\fB, unsigned long \fP\fIdfn\fP\fB,\fP
21 \fB unsigned long \fP\fIoff\fP\fB, unsigned long \fP\fIlen\fP\fB, void *\fP\fIbuf\fP\fB);\fP
22 \fBint pciconfig_write(unsigned long \fP\fIbus\fP\fB, unsigned long \fP\fIdfn\fP\fB,\fP
23 \fB unsigned long \fP\fIoff\fP\fB, unsigned long \fP\fIlen\fP\fB, void *\fP\fIbuf\fP\fB);\fP
24 \fBint pciconfig_iobase(long \fP\fIwhich\fP\fB, unsigned long \fP\fIbus\fP\fB,\fP
25 \fB unsigned long \fP\fIdevfn\fP\fB);\fP
29 Most of the interaction with PCI devices is already handled by the kernel
30 PCI layer, and thus these calls should not normally need to be accessed from
33 \fBpciconfig_read\fP()
34 デバイス \fIdev\fP のオフセット \fIoff\fP の値を \fIbuf\fP に読み込む。
36 \fBpciconfig_write\fP()
37 デバイス \fIdev\fP のオフセット \fIoff\fP に \fIbuf\fP の値を書き込む。
39 \fBpciconfig_iobase\fP()
40 bus/devfn ペアをこの関数に渡し、 メモリオフセット (prep のようなものでは、この値は 0xc0000000 である) と PIO
41 サイクルの IO ベースの物理アドレスを取得する。 また、もしあるならば ISA hole の物理アドレスを取得する。
44 \fBpciconfig_read\fP()
45 成功した場合、0 が返される。 エラーの場合、\-1 が返され、 \fIerrno\fP が適切に設定される。
47 \fBpciconfig_write\fP()
48 成功した場合、0 が返される。 エラーの場合、\-1 が返され、 \fIerrno\fP が適切に設定される。
50 \fBpciconfig_iobase\fP()
51 \fIwhich\fP の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。 \fIwhich\fP の値は、
52 \fBIOBASE_BRIDGE_NUMBER\fP, \fBIOBASE_MEMORY\fP, \fBIOBASE_IO\fP, \fBIOBASE_ISA_IO\fP,
53 \fBIOBASE_ISA_MEM\fP である。
57 \fIlen\fP の値が無効である。 このエラーは \fBpciconfig_iobase\fP() には適用されない。
63 \fBpciconfig_iobase\fP() の場合、でホース (hose) の値が NULL である。 他の呼び出しの場合、スロット (slot)
67 このシステムはこれらの呼び出しを実装していない。 (\fBCONFIG_PCI\fP が定義されていない)。
70 この返り値は \fBpciconfig_iobase\fP() でのみ有効である。 このエラーは \fIwhich\fP の値が無効であるときに返される。
73 ユーザが \fBCAP_SYS_ADMIN\fP 権限を持っていない。 このエラーは \fBpciconfig_iobase\fP() には適用されない。
75 これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能である。
79 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
80 である。プロジェクトの説明とバグ報告に関する情報は
81 http://www.kernel.org/doc/man\-pages/ に書かれている。