| NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | STANDARDS | HISTORY | SEE ALSO | COLOPHON | |
|  | 
pciconfig_read(2)          System Calls Manual          pciconfig_read(2)
       pciconfig_read, pciconfig_write, pciconfig_iobase - pci device
       information handling
       Standard C library (libc, -lc)
       #include <pci.h>
       int pciconfig_read(unsigned long bus, unsigned long dfn,
                          unsigned long off, unsigned long size,
                          unsigned char *buf);
       int pciconfig_write(unsigned long bus, unsigned long dfn,
                          unsigned long off, unsigned long size,
                          unsigned char *buf);
       int pciconfig_iobase(int which, unsigned long bus,
                          unsigned long devfn);
       Most of the interaction with PCI devices is already handled by the
       kernel PCI layer, and thus these calls should not normally need to
       be accessed from user space.
       pciconfig_read()
              Reads to buf from device dev at offset off value.
       pciconfig_write()
              Writes from buf to device dev at offset off value.
       pciconfig_iobase()
              You pass it a bus/devfn pair and get a physical address for
              either the memory offset (for things like prep, this is
              0xc0000000), the IO base for PIO cycles, or the ISA holes
              if any.
       pciconfig_read()
              On success, zero is returned.  On error, -1 is returned and
              errno is set to indicate the error.
       pciconfig_write()
              On success, zero is returned.  On error, -1 is returned and
              errno is set to indicate the error.
       pciconfig_iobase()
              Returns information on locations of various I/O regions in
              physical memory according to the which value.  Values for
              which are: IOBASE_BRIDGE_NUMBER, IOBASE_MEMORY, IOBASE_IO,
              IOBASE_ISA_IO, IOBASE_ISA_MEM.
       EINVAL size value is invalid.  This does not apply to
              pciconfig_iobase().
       EIO    I/O error.
       ENODEV For pciconfig_iobase(), "hose" value is NULL.  For the
              other calls, could not find a slot.
       ENOSYS The system has not implemented these calls (CONFIG_PCI not
              defined).
       EOPNOTSUPP
              This return value is valid only for pciconfig_iobase().  It
              is returned if the value for which is invalid.
       EPERM  User does not have the CAP_SYS_ADMIN capability.  This does
              not apply to pciconfig_iobase().
       Linux.
       Linux 2.0.26/2.1.11.
       capabilities(7)
       This page is part of the man-pages (Linux kernel and C library
       user-space interface documentation) project.  Information about
       the project can be found at 
       ⟨https://www.kernel.org/doc/man-pages/⟩.  If you have a bug report
       for this manual page, see
       ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.
       This page was obtained from the tarball man-pages-6.15.tar.gz
       fetched from
       ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on
       2025-08-11.  If you discover any rendering problems in this HTML
       version of the page, or you believe there is a better or more up-
       to-date source for the page, or you have corrections or
       improvements to the information in this COLOPHON (which is not
       part of the original manual page), send a mail to
       man-pages@man7.org
Linux man-pages 6.15            2025-05-17              pciconfig_read(2)
Pages that refer to this page: syscalls(2)
Copyright and license for this manual page