File: pciconfig_read.2

package info (click to toggle)
manpages-ja 0.5.0.0.20140515%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 27,672 kB
  • ctags: 7
  • sloc: perl: 161; makefile: 98
file content (86 lines) | stat: -rw-r--r-- 3,959 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.\" Contributed by Niki A. Rahimi, LTC Security Development
.\" narahimi@us.ibm.com
.\"
.\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
.\" May be freely distributed.
.\" %%%LICENSE_END
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.\"
.\" Japanese Version Copyright (c) 2004 Yuichi SATO
.\"         all rights reserved.
.\" Translated Sat Jun 19 17:51:11 JST 2004
.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
.\"
.TH PCICONFIG_READ 2 2003\-07\-14 Linux "Linux Programmer's Manual"
.SH 名前
pciconfig_read, pciconfig_write, pciconfig_iobase \- pci デバイス情報を扱う
.SH 書式
.nf
\fB#include <pci.h>\fP
.sp
\fBint pciconfig_read(unsigned long \fP\fIbus\fP\fB, unsigned long \fP\fIdfn\fP\fB,\fP
\fB          unsigned long \fP\fIoff\fP\fB, unsigned long \fP\fIlen\fP\fB, void *\fP\fIbuf\fP\fB);\fP
\fBint pciconfig_write(unsigned long \fP\fIbus\fP\fB, unsigned long \fP\fIdfn\fP\fB,\fP
\fB          unsigned long \fP\fIoff\fP\fB, unsigned long \fP\fIlen\fP\fB, void *\fP\fIbuf\fP\fB);\fP
\fBint pciconfig_iobase(long \fP\fIwhich\fP\fB, unsigned long \fP\fIbus\fP\fB,\fP
\fB          unsigned long \fP\fIdevfn\fP\fB);\fP
.fi
.SH 説明
.PP
PCI デバイスとのやり取り (interaction) は カーネル PCI レイヤですでに処理されているので、
通常はこららの関数をユーザ空間からアクセスする必要はない。
.TP 
\fBpciconfig_read\fP()
デバイス \fIdev\fP のオフセット \fIoff\fP の値を \fIbuf\fP に読み込む。
.TP 
\fBpciconfig_write\fP()
デバイス \fIdev\fP のオフセット \fIoff\fP に \fIbuf\fP の値を書き込む。
.TP 
\fBpciconfig_iobase\fP()
bus/devfn ペアをこの関数に渡し、 メモリオフセット (prep のようなものでは、この値は 0xc0000000 である) と PIO
サイクルの IO ベースの物理アドレスを取得する。 また、もしあるならば ISA hole の物理アドレスを取得する。
.SH 返り値
.TP 
\fBpciconfig_read\fP()
成功した場合、0 が返される。 エラーの場合、\-1 が返され、 \fIerrno\fP が適切に設定される。
.TP 
\fBpciconfig_write\fP()
成功した場合、0 が返される。 エラーの場合、\-1 が返され、 \fIerrno\fP が適切に設定される。
.TP 
\fBpciconfig_iobase\fP()
\fIwhich\fP の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。 \fIwhich\fP の値は、
\fBIOBASE_BRIDGE_NUMBER\fP, \fBIOBASE_MEMORY\fP, \fBIOBASE_IO\fP, \fBIOBASE_ISA_IO\fP,
\fBIOBASE_ISA_MEM\fP である。
.SH エラー
.TP 
\fBEINVAL\fP
\fIlen\fP の値が無効である。 このエラーは \fBpciconfig_iobase\fP()  には適用されない。
.TP 
\fBEIO\fP
I/O エラー。
.TP 
\fBENODEV\fP
\fBpciconfig_iobase\fP()  の場合、でホース (hose) の値が NULL である。 他の呼び出しの場合、スロット (slot)
が見つからない。
.TP 
\fBENOSYS\fP
このシステムはこれらの呼び出しを実装していない。 (\fBCONFIG_PCI\fP が定義されていない)。
.TP 
\fBEOPNOTSUPP\fP
この返り値は \fBpciconfig_iobase\fP()  でのみ有効である。 このエラーは \fIwhich\fP の値が無効であるときに返される。
.TP 
\fBEPERM\fP
ユーザが \fBCAP_SYS_ADMIN\fP 権限を持っていない。 このエラーは \fBpciconfig_iobase\fP()  には適用されない。
.SH 準拠
これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能である。
.SH 関連項目
\fBcapabilities\fP(7)
.SH この文書について
この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。