xref: /pciutils/README (revision e4d209fd)
1ab12277eSMartin MaresThis package contains the PCI Utilities, version @VERSION@.
22f48f637SMartin Mares
39f9e373bSMartin MaresCopyright (c) 1997--2017 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
7deaad187SMartin Mares(at your opinion) any newer version. See http://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)
300ac282f2SMartin Mares
3181abd2a7SMartin MaresIt should be very easy to add support for other systems as well (volunteers
3281abd2a7SMartin Mareswanted; if you want to try that, I'll be very glad to see the patches and
3381abd2a7SMartin Maresinclude them in the next version).
34727ce158SMartin Mares
3555c815b5SMartin MaresThe utilities include:  (See manual pages for more details)
36b2c9b373SMartin Mares
3746ea554dSMartin Mares  - lspci: displays detailed information about all PCI buses and devices.
38b2c9b373SMartin Mares
39b2c9b373SMartin Mares  - setpci: allows to read from and write to PCI device configuration
40b2c9b373SMartin Mares    registers. For example, you can adjust the latency timers with it.
4107159913SMartin Mares    CAUTION: There is a couple of dangerous points and caveats, please read
4207159913SMartin Mares    the manual page first!
43b2c9b373SMartin Mares
441b95f396SMartin Mares  - update-pciids: download the current version of the pci.ids file.
451b95f396SMartin Mares
462f48f637SMartin Mares
4707159913SMartin Mares2. Compiling and (un)installing
4807159913SMartin Mares~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4907159913SMartin MaresJust run "make" to compile the package and then "make install" to install it.
50d7ea742cSMartin MaresPlease note that GNU make is needed on most platforms.
51f3395cc5SMartin Mares
5207159913SMartin MaresIf you want to change the default installation location, please override
53f4ddb8d3SMartin Maresthe PREFIX variable specified in the Makefile -- e.g., you can use
54f4ddb8d3SMartin Mares"make PREFIX=/opt/pciutils install" to create a separate installation
55f4ddb8d3SMartin Maresnot interfering with the rest of your system.  Setting the DESTDIR variable
56f4ddb8d3SMartin Mareswill allow you to install to a different directory from the one you intend
57f4ddb8d3SMartin Maresto eventually run it from.  This is useful for people who are packaging
58f4ddb8d3SMartin Marespciutils to install on other computers.
5907159913SMartin Mares
60d7ea742cSMartin MaresThere are several options which can be set in the Makefile or overridden
61d7ea742cSMartin Mareswhen running make:
62d7ea742cSMartin Mares
63d7ea742cSMartin Mares  ZLIB=yes/no	Enable support for compressed pci.ids (requires zlib).
64d7ea742cSMartin Mares		If it is enabled, pciutils will use pci.ids.gz in preference to
65d7ea742cSMartin Mares		pci.ids, even if the pci.ids file is newer.  If the pci.ids.gz
66d7ea742cSMartin Mares		file is missing, it will use pci.ids instead.  If you do not
67d7ea742cSMartin Mares		specify this option, the configure script will try to guess
68d7ea742cSMartin Mares		automatically based on the presence of zlib.
69d7ea742cSMartin Mares
70dab118d2SMartin Mares  DNS=yes/no	Enable support for querying the central database of PCI IDs
71d7ea742cSMartin Mares		using DNS.  Requires libresolv (which is available on most
72d7ea742cSMartin Mares		systems as a part of the standard libraries) and tries to
73d7ea742cSMartin Mares		autodetect its presence if the option is not specified.
74d7ea742cSMartin Mares
752f421184SMartin Mares  SHARED=yes/	Build libpci as a shared library.  Requires GCC 4.0 or newer.
76d7ea742cSMartin Mares  no/local	The ABI of the shared library is intended to remain backward
77d7ea742cSMartin Mares		compatible for a long time (we use symbol versioning to achieve
78d7ea742cSMartin Mares		that, like GNU libc does).  The value `local' includes the
79d7ea742cSMartin Mares		right directory name in the binaries, so the utilities can be
80d7ea742cSMartin Mares		run without installation.  This is not recommended for any
81d7ea742cSMartin Mares		production builds.
82d7ea742cSMartin Mares
83d7ea742cSMartin Mares"make install-lib" installs the library together with its header files
84d7ea742cSMartin Maresfor use by other programs.
85cc062b4aSMartin Mares
8607159913SMartin MaresWhen you are bored of dumping PCI registers, just use "make uninstall".
8707159913SMartin Mares
8807159913SMartin Mares
89dab118d2SMartin Mares3. Getting new IDs
9007159913SMartin Mares~~~~~~~~~~~~~~~~~~~
91dab118d2SMartin MaresThe database of PCI IDs (the pci.ids file) gets out of date much faster
92dab118d2SMartin Maresthan I release new versions of this package, so it is maintained separately.
9307159913SMartin Mares
94dab118d2SMartin MaresIt lives at http://pci-ids.ucw.cz/, where you can browse the database,
95dab118d2SMartin Maresdownload the most recent pci.ids file (e.g., by running the update-ids utility)
96dab118d2SMartin Maresand also submit new entries.
97a33d0eb7SMartin Mares
9814b85d7cSMartin MaresAlternatively, you can use `lspci -q' to query the central database
9914b85d7cSMartin Maresfor new entries via network.
10014b85d7cSMartin Mares
101cb968b8fSMartin MaresThe pci.ids file is also mirrored at https://github.com/pciutils/pciids.
10207159913SMartin Mares
103b5847329SMartin MaresOn Linux systems with a recent enough version of libudev, UDEV's HWDB
104b5847329SMartin Maresdatabase is consulted when pci.ids lacks the device.
105b5847329SMartin Mares
10607159913SMartin Mares
1070ac282f2SMartin Mares4. Getting new versions
1080ac282f2SMartin Mares~~~~~~~~~~~~~~~~~~~~~~~
109dab118d2SMartin MaresThe current version of pciutils is available at:
110dab118d2SMartin Mares
111dab118d2SMartin Mares	http://mj.ucw.cz/sw/pciutils/
112dab118d2SMartin Mares
113dab118d2SMartin MaresThe tarball can be downloaded at the following places:
11407159913SMartin Mares
1150ac282f2SMartin Mares	ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/
116*e4d209fdSMartin Mares	https://www.kernel.org/pub/software/utils/pciutils/ (expect a couple of hours delay)
1170ac282f2SMartin Mares
1180ac282f2SMartin MaresThere is also a public GIT tree at:
1190ac282f2SMartin Mares
1200ac282f2SMartin Mares	git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
121cb968b8fSMartin Mares	https://github.com/pciutils/pciutils
12207159913SMartin Mares
12307159913SMartin Mares
12407159913SMartin Mares5. Using the library
12507159913SMartin Mares~~~~~~~~~~~~~~~~~~~~
12614b85d7cSMartin MaresSo far, there is only a little documentation for the library except for the
12714b85d7cSMartin Maresgeneral introduction in the pcilib(7) man page. If you want to use the
12814b85d7cSMartin Mareslibrary in your programs, please follow the comments in lib/pci.h and in
129bc46bc39SMartin Maresthe example program example.c.
13007159913SMartin Mares
13107159913SMartin Mares
13207159913SMartin Mares6. Feedback
13307159913SMartin Mares~~~~~~~~~~~
1342f48f637SMartin MaresIf you have any bug reports or suggestions, send them to the author.
1352f48f637SMartin Mares
136dab118d2SMartin MaresIf you have any new IDs, I'll be very glad to add them to the database.
137dab118d2SMartin MaresJust submit them at http://pci-ids.ucw.cz/.
13807159913SMartin Mares
139dab118d2SMartin MaresAnnouncements of new versions are sent to [email protected]
140dab118d2SMartin Mares(see http://vger.kernel.org/ for instructions).
1412bea6231SMartin Mares
14255c815b5SMartin Mares					Have fun
14355c815b5SMartin Mares							Martin
144