1ab12277eSMartin MaresThis package contains the PCI Utilities, version @VERSION@. 22f48f637SMartin Mares 3b84aa2e4SMartin MaresCopyright (c) 1997--2020 Martin Mares <[email protected]> 42f48f637SMartin Mares 52f48f637SMartin MaresAll files in this package can be freely distributed and used according 62f48f637SMartin Maresto the terms of the GNU General Public License, either version 2 or 7633e6f81SMartin Mares(at your opinion) any newer version. See https://www.gnu.org/ for details. 82f48f637SMartin Mares 953e73b36SMartin MaresThe author wants to clarify that he does not consider programs which link 1053e73b36SMartin Maresdynamically to the libpci to be derived works of the library. 1153e73b36SMartin Mares 12727ce158SMartin Mares 1307159913SMartin Mares1. What's that? 1407159913SMartin Mares~~~~~~~~~~~~~~~ 1555c815b5SMartin MaresThe PCI Utilities package contains a library for portable access to PCI bus 1607159913SMartin Maresconfiguration registers and several utilities based on this library. 1707159913SMartin Mares 180ac282f2SMartin MaresIn runs on the following systems: 190ac282f2SMartin Mares 200ac282f2SMartin Mares Linux (via /sys/bus/pci, /proc/bus/pci or i386 ports) 210ac282f2SMartin Mares FreeBSD (via /dev/pci) 220ac282f2SMartin Mares NetBSD (via libpci) 230ac282f2SMartin Mares OpenBSD (via /dev/pci) 240ac282f2SMartin Mares GNU/kFreeBSD (via /dev/pci) 250ac282f2SMartin Mares Solaris/i386 (direct port access) 260ac282f2SMartin Mares Aix (via /dev/pci and odmget) 270ac282f2SMartin Mares GNU Hurd (direct port access) 28*83b2cb2eSPali Rohár Windows (via cfgmgr32 or direct port access, see README.Windows for caveats) 29550d67d1SMartin Mares CYGWIN (direct port access) 3040e253d7SFrançois Revol BeOS (via syscalls) 3140e253d7SFrançois Revol Haiku (via /dev/misc/poke) 328d1cb3d7SRichard Yao Darwin (via IOKit) 335c5ce192SRudolf Marek DOS/DJGPP (via i386 ports) 345f22f791SGongYuJian SylixOS (via /proc/pci) 350ac282f2SMartin Mares 3681abd2a7SMartin MaresIt should be very easy to add support for other systems as well (volunteers 3781abd2a7SMartin Mareswanted; if you want to try that, I'll be very glad to see the patches and 3881abd2a7SMartin Maresinclude them in the next version). 39727ce158SMartin Mares 4055c815b5SMartin MaresThe utilities include: (See manual pages for more details) 41b2c9b373SMartin Mares 4246ea554dSMartin Mares - lspci: displays detailed information about all PCI buses and devices. 43b2c9b373SMartin Mares 44b2c9b373SMartin Mares - setpci: allows to read from and write to PCI device configuration 45b2c9b373SMartin Mares registers. For example, you can adjust the latency timers with it. 4607159913SMartin Mares CAUTION: There is a couple of dangerous points and caveats, please read 4707159913SMartin Mares the manual page first! 48b2c9b373SMartin Mares 491b95f396SMartin Mares - update-pciids: download the current version of the pci.ids file. 501b95f396SMartin Mares 512f48f637SMartin Mares 5207159913SMartin Mares2. Compiling and (un)installing 5307159913SMartin Mares~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5407159913SMartin MaresJust run "make" to compile the package and then "make install" to install it. 55f7f2966bSMartin MaresPlease note that a C compiler supporting the C99 standard is required. 56f7f2966bSMartin MaresAlso, GNU make is needed on most platforms. 57f3395cc5SMartin Mares 5807159913SMartin MaresIf you want to change the default installation location, please override 59f4ddb8d3SMartin Maresthe PREFIX variable specified in the Makefile -- e.g., you can use 60f4ddb8d3SMartin Mares"make PREFIX=/opt/pciutils install" to create a separate installation 61f4ddb8d3SMartin Maresnot interfering with the rest of your system. Setting the DESTDIR variable 62f4ddb8d3SMartin Mareswill allow you to install to a different directory from the one you intend 63f4ddb8d3SMartin Maresto eventually run it from. This is useful for people who are packaging 64f4ddb8d3SMartin Marespciutils to install on other computers. 6507159913SMartin Mares 66d7ea742cSMartin MaresThere are several options which can be set in the Makefile or overridden 67d7ea742cSMartin Mareswhen running make: 68d7ea742cSMartin Mares 69d7ea742cSMartin Mares ZLIB=yes/no Enable support for compressed pci.ids (requires zlib). 70d7ea742cSMartin Mares If it is enabled, pciutils will use pci.ids.gz in preference to 71d7ea742cSMartin Mares pci.ids, even if the pci.ids file is newer. If the pci.ids.gz 72d7ea742cSMartin Mares file is missing, it will use pci.ids instead. If you do not 73d7ea742cSMartin Mares specify this option, the configure script will try to guess 74d7ea742cSMartin Mares automatically based on the presence of zlib. 75d7ea742cSMartin Mares 76dab118d2SMartin Mares DNS=yes/no Enable support for querying the central database of PCI IDs 77d7ea742cSMartin Mares using DNS. Requires libresolv (which is available on most 78d7ea742cSMartin Mares systems as a part of the standard libraries) and tries to 79d7ea742cSMartin Mares autodetect its presence if the option is not specified. 80d7ea742cSMartin Mares 812f421184SMartin Mares SHARED=yes/ Build libpci as a shared library. Requires GCC 4.0 or newer. 82d7ea742cSMartin Mares no/local The ABI of the shared library is intended to remain backward 83d7ea742cSMartin Mares compatible for a long time (we use symbol versioning to achieve 84d7ea742cSMartin Mares that, like GNU libc does). The value `local' includes the 85d7ea742cSMartin Mares right directory name in the binaries, so the utilities can be 86d7ea742cSMartin Mares run without installation. This is not recommended for any 87d7ea742cSMartin Mares production builds. 88d7ea742cSMartin Mares 89d7ea742cSMartin Mares"make install-lib" installs the library together with its header files 90d7ea742cSMartin Maresfor use by other programs. 91cc062b4aSMartin Mares 9207159913SMartin MaresWhen you are bored of dumping PCI registers, just use "make uninstall". 9307159913SMartin Mares 9407159913SMartin Mares 95dab118d2SMartin Mares3. Getting new IDs 9607159913SMartin Mares~~~~~~~~~~~~~~~~~~~ 97dab118d2SMartin MaresThe database of PCI IDs (the pci.ids file) gets out of date much faster 98dab118d2SMartin Maresthan I release new versions of this package, so it is maintained separately. 9907159913SMartin Mares 100633e6f81SMartin MaresIt lives at https://pci-ids.ucw.cz/, where you can browse the database, 101dab118d2SMartin Maresdownload the most recent pci.ids file (e.g., by running the update-ids utility) 102dab118d2SMartin Maresand also submit new entries. 103a33d0eb7SMartin Mares 10414b85d7cSMartin MaresAlternatively, you can use `lspci -q' to query the central database 10514b85d7cSMartin Maresfor new entries via network. 10614b85d7cSMartin Mares 107cb968b8fSMartin MaresThe pci.ids file is also mirrored at https://github.com/pciutils/pciids. 10807159913SMartin Mares 109b5847329SMartin MaresOn Linux systems with a recent enough version of libudev, UDEV's HWDB 110b5847329SMartin Maresdatabase is consulted when pci.ids lacks the device. 111b5847329SMartin Mares 11207159913SMartin Mares 1130ac282f2SMartin Mares4. Getting new versions 1140ac282f2SMartin Mares~~~~~~~~~~~~~~~~~~~~~~~ 115dab118d2SMartin MaresThe current version of pciutils is available at: 116dab118d2SMartin Mares 117633e6f81SMartin Mares https://mj.ucw.cz/sw/pciutils/ 118dab118d2SMartin Mares 119dab118d2SMartin MaresThe tarball can be downloaded at the following places: 12007159913SMartin Mares 121310a33cfSMartin Mares https://mj.ucw.cz/download/linux/pci/ 122310a33cfSMartin Mares ftp://ftp.ucw.cz/pub/mj/linux/pci/ 123e4d209fdSMartin Mares https://www.kernel.org/pub/software/utils/pciutils/ (expect a couple of hours delay) 1240ac282f2SMartin Mares 1250ac282f2SMartin MaresThere is also a public GIT tree at: 1260ac282f2SMartin Mares 127633e6f81SMartin Mares https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git 128cb968b8fSMartin Mares https://github.com/pciutils/pciutils 12907159913SMartin Mares 13007159913SMartin Mares 13107159913SMartin Mares5. Using the library 13207159913SMartin Mares~~~~~~~~~~~~~~~~~~~~ 13314b85d7cSMartin MaresSo far, there is only a little documentation for the library except for the 13414b85d7cSMartin Maresgeneral introduction in the pcilib(7) man page. If you want to use the 13514b85d7cSMartin Mareslibrary in your programs, please follow the comments in lib/pci.h and in 136bc46bc39SMartin Maresthe example program example.c. 13707159913SMartin Mares 13807159913SMartin Mares 13907159913SMartin Mares6. Feedback 14007159913SMartin Mares~~~~~~~~~~~ 1412f48f637SMartin MaresIf you have any bug reports or suggestions, send them to the author. 1422f48f637SMartin Mares 143dab118d2SMartin MaresIf you have any new IDs, I'll be very glad to add them to the database. 144633e6f81SMartin MaresJust submit them at https://pci-ids.ucw.cz/. 14507159913SMartin Mares 146dab118d2SMartin MaresAnnouncements of new versions are sent to [email protected] 147dab118d2SMartin Mares(see http://vger.kernel.org/ for instructions). 1482bea6231SMartin Mares 14955c815b5SMartin Mares Have fun 15055c815b5SMartin Mares Martin 151