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 2022-09-09 "Linux man-pages (unreleased)"
10 pciconfig_read, pciconfig_write, pciconfig_iobase \-
11 pci device information handling
14 .RI ( libc ", " \-lc )
19 .BI "int pciconfig_read(unsigned long " bus ", unsigned long " dfn ,
20 .BI " unsigned long " off ", unsigned long " len ,
21 .BI " unsigned char *" buf );
22 .BI "int pciconfig_write(unsigned long " bus ", unsigned long " dfn ,
23 .BI " unsigned long " off ", unsigned long " len ,
24 .BI " unsigned char *" buf );
25 .BI "int pciconfig_iobase(int " which ", unsigned long " bus ,
26 .BI " unsigned long " devfn );
29 Most of the interaction with PCI devices is already handled by the
31 and thus these calls should not normally need to be accessed from user space.
42 .BR pciconfig_write ()
51 .BR pciconfig_iobase ()
52 You pass it a bus/devfn pair and get a physical address for either the
53 memory offset (for things like prep, this is 0xc0000000),
54 the IO base for PIO cycles, or the ISA holes if any.
58 On success, zero is returned.
59 On error, \-1 is returned and
61 is set to indicate the error.
63 .BR pciconfig_write ()
64 On success, zero is returned.
65 On error, \-1 is returned and
67 is set to indicate the error.
69 .BR pciconfig_iobase ()
70 Returns information on locations of various I/O
71 regions in physical memory according to the
77 .BR IOBASE_BRIDGE_NUMBER ,
87 This does not apply to
88 .BR pciconfig_iobase ().
95 .BR pciconfig_iobase (),
97 For the other calls, could not find a slot.
100 The system has not implemented these calls
105 This return value is valid only for
106 .BR pciconfig_iobase ().
107 It is returned if the value for
112 User does not have the
115 This does not apply to
116 .BR pciconfig_iobase ().
118 These calls are Linux-specific, available since Linux 2.0.26/2.1.11.