xref: /pciutils/README (revision b84aa2e4)
1ab12277eSMartin MaresThis package contains the PCI Utilities, version @VERSION@.
22f48f637SMartin Mares
3*b84aa2e4SMartin 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
9727ce158SMartin Mares
1007159913SMartin Mares1. What's that?
1107159913SMartin Mares~~~~~~~~~~~~~~~
1255c815b5SMartin MaresThe PCI Utilities package contains a library for portable access to PCI bus
1307159913SMartin Maresconfiguration registers and several utilities based on this library.
1407159913SMartin Mares
150ac282f2SMartin MaresIn runs on the following systems:
160ac282f2SMartin Mares
170ac282f2SMartin Mares	Linux		(via /sys/bus/pci, /proc/bus/pci or i386 ports)
180ac282f2SMartin Mares	FreeBSD		(via /dev/pci)
190ac282f2SMartin Mares	NetBSD		(via libpci)
200ac282f2SMartin Mares	OpenBSD		(via /dev/pci)
210ac282f2SMartin Mares	GNU/kFreeBSD	(via /dev/pci)
220ac282f2SMartin Mares	Solaris/i386	(direct port access)
230ac282f2SMartin Mares	Aix		(via /dev/pci and odmget)
240ac282f2SMartin Mares	GNU Hurd	(direct port access)
25b5847329SMartin Mares	Windows		(direct port access, see README.Windows for caveats)
26550d67d1SMartin Mares	CYGWIN		(direct port access)
2740e253d7SFrançois Revol	BeOS		(via syscalls)
2840e253d7SFrançois Revol	Haiku		(via /dev/misc/poke)
298d1cb3d7SRichard Yao	Darwin		(via IOKit)
305c5ce192SRudolf Marek	DOS/DJGPP	(via i386 ports)
315f22f791SGongYuJian	SylixOS		(via /proc/pci)
320ac282f2SMartin Mares
3381abd2a7SMartin MaresIt should be very easy to add support for other systems as well (volunteers
3481abd2a7SMartin Mareswanted; if you want to try that, I'll be very glad to see the patches and
3581abd2a7SMartin Maresinclude them in the next version).
36727ce158SMartin Mares
3755c815b5SMartin MaresThe utilities include:  (See manual pages for more details)
38b2c9b373SMartin Mares
3946ea554dSMartin Mares  - lspci: displays detailed information about all PCI buses and devices.
40b2c9b373SMartin Mares
41b2c9b373SMartin Mares  - setpci: allows to read from and write to PCI device configuration
42b2c9b373SMartin Mares    registers. For example, you can adjust the latency timers with it.
4307159913SMartin Mares    CAUTION: There is a couple of dangerous points and caveats, please read
4407159913SMartin Mares    the manual page first!
45b2c9b373SMartin Mares
461b95f396SMartin Mares  - update-pciids: download the current version of the pci.ids file.
471b95f396SMartin Mares
482f48f637SMartin Mares
4907159913SMartin Mares2. Compiling and (un)installing
5007159913SMartin Mares~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5107159913SMartin MaresJust run "make" to compile the package and then "make install" to install it.
52d7ea742cSMartin MaresPlease note that GNU make is needed on most platforms.
53f3395cc5SMartin Mares
5407159913SMartin MaresIf you want to change the default installation location, please override
55f4ddb8d3SMartin Maresthe PREFIX variable specified in the Makefile -- e.g., you can use
56f4ddb8d3SMartin Mares"make PREFIX=/opt/pciutils install" to create a separate installation
57f4ddb8d3SMartin Maresnot interfering with the rest of your system.  Setting the DESTDIR variable
58f4ddb8d3SMartin Mareswill allow you to install to a different directory from the one you intend
59f4ddb8d3SMartin Maresto eventually run it from.  This is useful for people who are packaging
60f4ddb8d3SMartin Marespciutils to install on other computers.
6107159913SMartin Mares
62d7ea742cSMartin MaresThere are several options which can be set in the Makefile or overridden
63d7ea742cSMartin Mareswhen running make:
64d7ea742cSMartin Mares
65d7ea742cSMartin Mares  ZLIB=yes/no	Enable support for compressed pci.ids (requires zlib).
66d7ea742cSMartin Mares		If it is enabled, pciutils will use pci.ids.gz in preference to
67d7ea742cSMartin Mares		pci.ids, even if the pci.ids file is newer.  If the pci.ids.gz
68d7ea742cSMartin Mares		file is missing, it will use pci.ids instead.  If you do not
69d7ea742cSMartin Mares		specify this option, the configure script will try to guess
70d7ea742cSMartin Mares		automatically based on the presence of zlib.
71d7ea742cSMartin Mares
72dab118d2SMartin Mares  DNS=yes/no	Enable support for querying the central database of PCI IDs
73d7ea742cSMartin Mares		using DNS.  Requires libresolv (which is available on most
74d7ea742cSMartin Mares		systems as a part of the standard libraries) and tries to
75d7ea742cSMartin Mares		autodetect its presence if the option is not specified.
76d7ea742cSMartin Mares
772f421184SMartin Mares  SHARED=yes/	Build libpci as a shared library.  Requires GCC 4.0 or newer.
78d7ea742cSMartin Mares  no/local	The ABI of the shared library is intended to remain backward
79d7ea742cSMartin Mares		compatible for a long time (we use symbol versioning to achieve
80d7ea742cSMartin Mares		that, like GNU libc does).  The value `local' includes the
81d7ea742cSMartin Mares		right directory name in the binaries, so the utilities can be
82d7ea742cSMartin Mares		run without installation.  This is not recommended for any
83d7ea742cSMartin Mares		production builds.
84d7ea742cSMartin Mares
85d7ea742cSMartin Mares"make install-lib" installs the library together with its header files
86d7ea742cSMartin Maresfor use by other programs.
87cc062b4aSMartin Mares
8807159913SMartin MaresWhen you are bored of dumping PCI registers, just use "make uninstall".
8907159913SMartin Mares
9007159913SMartin Mares
91dab118d2SMartin Mares3. Getting new IDs
9207159913SMartin Mares~~~~~~~~~~~~~~~~~~~
93dab118d2SMartin MaresThe database of PCI IDs (the pci.ids file) gets out of date much faster
94dab118d2SMartin Maresthan I release new versions of this package, so it is maintained separately.
9507159913SMartin Mares
96633e6f81SMartin MaresIt lives at https://pci-ids.ucw.cz/, where you can browse the database,
97dab118d2SMartin Maresdownload the most recent pci.ids file (e.g., by running the update-ids utility)
98dab118d2SMartin Maresand also submit new entries.
99a33d0eb7SMartin Mares
10014b85d7cSMartin MaresAlternatively, you can use `lspci -q' to query the central database
10114b85d7cSMartin Maresfor new entries via network.
10214b85d7cSMartin Mares
103cb968b8fSMartin MaresThe pci.ids file is also mirrored at https://github.com/pciutils/pciids.
10407159913SMartin Mares
105b5847329SMartin MaresOn Linux systems with a recent enough version of libudev, UDEV's HWDB
106b5847329SMartin Maresdatabase is consulted when pci.ids lacks the device.
107b5847329SMartin Mares
10807159913SMartin Mares
1090ac282f2SMartin Mares4. Getting new versions
1100ac282f2SMartin Mares~~~~~~~~~~~~~~~~~~~~~~~
111dab118d2SMartin MaresThe current version of pciutils is available at:
112dab118d2SMartin Mares
113633e6f81SMartin Mares	https://mj.ucw.cz/sw/pciutils/
114dab118d2SMartin Mares
115dab118d2SMartin MaresThe tarball can be downloaded at the following places:
11607159913SMartin Mares
117310a33cfSMartin Mares	https://mj.ucw.cz/download/linux/pci/
118310a33cfSMartin Mares	ftp://ftp.ucw.cz/pub/mj/linux/pci/
119e4d209fdSMartin Mares	https://www.kernel.org/pub/software/utils/pciutils/ (expect a couple of hours delay)
1200ac282f2SMartin Mares
1210ac282f2SMartin MaresThere is also a public GIT tree at:
1220ac282f2SMartin Mares
123633e6f81SMartin Mares	https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
124cb968b8fSMartin Mares	https://github.com/pciutils/pciutils
12507159913SMartin Mares
12607159913SMartin Mares
12707159913SMartin Mares5. Using the library
12807159913SMartin Mares~~~~~~~~~~~~~~~~~~~~
12914b85d7cSMartin MaresSo far, there is only a little documentation for the library except for the
13014b85d7cSMartin Maresgeneral introduction in the pcilib(7) man page. If you want to use the
13114b85d7cSMartin Mareslibrary in your programs, please follow the comments in lib/pci.h and in
132bc46bc39SMartin Maresthe example program example.c.
13307159913SMartin Mares
13407159913SMartin Mares
13507159913SMartin Mares6. Feedback
13607159913SMartin Mares~~~~~~~~~~~
1372f48f637SMartin MaresIf you have any bug reports or suggestions, send them to the author.
1382f48f637SMartin Mares
139dab118d2SMartin MaresIf you have any new IDs, I'll be very glad to add them to the database.
140633e6f81SMartin MaresJust submit them at https://pci-ids.ucw.cz/.
14107159913SMartin Mares
142dab118d2SMartin MaresAnnouncements of new versions are sent to [email protected]
143dab118d2SMartin Mares(see http://vger.kernel.org/ for instructions).
1442bea6231SMartin Mares
14555c815b5SMartin Mares					Have fun
14655c815b5SMartin Mares							Martin
147