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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
.\" Contributed by Niki A. Rahimi, LTC Security Development
.\" narahimi@us.ibm.com
.\" May be freely distributed.
.\"
.\" 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
.B #include <pci.h>
.sp
.BI "int pciconfig_read(unsigned long " bus ", unsigned long " dfn ,
.BI " unsigned long " off ", unsigned long " len ", void *" buf );
.BI "int pciconfig_write(unsigned long " bus ", unsigned long " dfn ,
.BI " unsigned long " off ", unsigned long " len ", void *" buf );
.BI "int pciconfig_iobase(long " which ", unsigned long " bus ,
.BI " unsigned long " devfn );
.fi
.SH
.PP
PCI ǥХȤΤ (interaction)
ͥ PCI 쥤ǤǤ˽ƤΤǡ
̾Ϥδؿ桼֤饢ɬפϤʤ
.TP
.BR pciconfig_read ()
ǥХ
.I dev
Υեå
.I off
ͤ
.I buf
ɤ߹ࡣ
.TP
.BR pciconfig_write ()
ǥХ
.I dev
Υեå
.I off
.I buf
ͤࡣ
.TP
.BR pciconfig_iobase ()
bus/devfn ڥδؿϤ
ꥪեå (prep Τ褦ʤΤǤϡͤ 0xc0000000 Ǥ)
PIO IO ١ʪɥ쥹롣
ޤ⤷ʤ ISA hole ʪɥ쥹롣
.SH ֤
.TP
.BR pciconfig_read ()
硢0 ֤롣
顼ξ硢\-1 ֤졢
.I errno
Ŭڤꤵ롣
.TP
.BR pciconfig_write ()
硢0 ֤롣
顼ξ硢\-1 ֤졢
.I errno
Ŭڤꤵ롣
.TP
.BR pciconfig_iobase ()
.I which
ͤ˴Ťơʪ͡ I/O ΰΰ־֤롣
.I which
ͤϡ
.BR IOBASE_BRIDGE_NUMBER ,
.BR IOBASE_MEMORY ,
.BR IOBASE_IO ,
.BR IOBASE_ISA_IO ,
.B IOBASE_ISA_MEM
Ǥ롣
.SH 顼
.TP
.B EINVAL
.I len
̵ͤǤ롣
Υ顼
.BR pciconfig_iobase ()
ˤŬѤʤ
.TP
.B EIO
I/O 顼
.TP
.B ENODEV
.BR pciconfig_iobase ()
ξ硢ǥۡ (hose) ͤ NULL Ǥ롣
¾θƤӽФξ硢å (slot) Ĥʤ
.TP
.B ENOSYS
ΥƥϤθƤӽФƤʤ
.RB ( CONFIG_PCI
Ƥʤ)
.TP
.B EOPNOTSUPP
֤ͤ
.BR pciconfig_iobase ()
ǤΤͭǤ롣
Υ顼
.I which
̵ͤǤȤ֤롣
.TP
.B EPERM
桼
.B CAP_SYS_ADMIN
¤äƤʤ
Υ顼
.BR pciconfig_iobase ()
ˤŬѤʤ
.SH
θƤӽФ Linux ͭΤΤǤꡢ
Linux 2.0.26/2.1.11 ѲǽǤ롣
.SH Ϣ
.BR capabilities (7)
|