1 .\" Contributed by Niki A. Rahimi, LTC Security Development
2 .\" narahimi@us.ibm.com
3 .\" May be freely distributed.
5 .TH PCICONFIG_READ 2 2003-07-14 "Linux" "Linux Programmer's Manual"
7 pciconfig_read, pciconfig_write, pciconfig_iobase \- pci device information handling
12 .BI "int pciconfig_read(unsigned long " bus ", unsigned long " dfn ,
13 .BI " unsigned long " off ", unsigned long " len ", void *" buf );
14 .BI "int pciconfig_write(unsigned long " bus ", unsigned long " dfn ,
15 .BI " unsigned long " off ", unsigned long " len ", void *" buf );
16 .BI "int pciconfig_iobase(long " which ", unsigned long " bus ,
17 .BI " unsigned long " devfn );
21 Most of the interaction with PCI devices is already handled by the
23 and thus these calls should not normally need to be accessed from userspace.
34 .BR pciconfig_write ()
43 .BR pciconfig_iobase ()
44 You pass it a bus/devfn pair and get a physical address for either the
45 memory offset (for things like prep, this is 0xc0000000),
46 the IO base for PIO cycles, or the ISA holes if any.
50 On success zero is returned.
51 On error, \-1 is returned and
55 .BR pciconfig_write ()
56 On success zero is returned.
57 On error, \-1 is returned and
61 .BR pciconfig_iobase ()
62 Returns information on locations of various I/O
63 regions in physical memory according to the
69 .BR IOBASE_BRIDGE_NUMBER ,
79 This does not apply to
80 .BR pciconfig_iobase ().
87 .BR pciconfig_iobase (),
89 For the other calls, could not find a slot.
92 The system has not implemented these calls
97 This return value is only valid for
98 .BR pciconfig_iobase ().
99 It is returned if the value for
104 User does not have the \fBCAP_SYS_ADMIN\fP capability.
105 This does not apply to
106 .BR pciconfig_iobase ().
108 These calls are Linux-specific, available since Linux 2.0.26/2.1.11.