1 .\" Contributed by Niki A. Rahimi, LTC Security Development
2 .\" narahimi@us.ibm.com
4 .\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
5 .\" May be freely distributed and modified.
8 .TH PCICONFIG_READ 2 2021-03-22 "Linux" "Linux Programmer's Manual"
10 pciconfig_read, pciconfig_write, pciconfig_iobase \- pci device information handling
15 .BI "int pciconfig_read(unsigned long " bus ", unsigned long " dfn ,
16 .BI " unsigned long " off ", unsigned long " len ,
17 .BI " unsigned char *" buf );
18 .BI "int pciconfig_write(unsigned long " bus ", unsigned long " dfn ,
19 .BI " unsigned long " off ", unsigned long " len ,
20 .BI " unsigned char *" buf );
21 .BI "int pciconfig_iobase(int " which ", unsigned long " bus ,
22 .BI " unsigned long " devfn );
25 Most of the interaction with PCI devices is already handled by the
27 and thus these calls should not normally need to be accessed from user space.
38 .BR pciconfig_write ()
47 .BR pciconfig_iobase ()
48 You pass it a bus/devfn pair and get a physical address for either the
49 memory offset (for things like prep, this is 0xc0000000),
50 the IO base for PIO cycles, or the ISA holes if any.
54 On success, zero is returned.
55 On error, \-1 is returned and
57 is set to indicate the error.
59 .BR pciconfig_write ()
60 On success, zero is returned.
61 On error, \-1 is returned and
63 is set to indicate the error.
65 .BR pciconfig_iobase ()
66 Returns information on locations of various I/O
67 regions in physical memory according to the
73 .BR IOBASE_BRIDGE_NUMBER ,
83 This does not apply to
84 .BR pciconfig_iobase ().
91 .BR pciconfig_iobase (),
93 For the other calls, could not find a slot.
96 The system has not implemented these calls
101 This return value is valid only for
102 .BR pciconfig_iobase ().
103 It is returned if the value for
108 User does not have the
111 This does not apply to
112 .BR pciconfig_iobase ().
114 These calls are Linux-specific, available since Linux 2.0.26/2.1.11.