xref: /pciutils/README (revision d7ea742c)
1ab12277eSMartin MaresThis package contains the PCI Utilities, version @VERSION@.
22f48f637SMartin Mares
314b85d7cSMartin MaresCopyright (c) 1997--2008 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)
250ac282f2SMartin Mares	Windows		(direct port access)
260ac282f2SMartin Mares
2781abd2a7SMartin MaresIt should be very easy to add support for other systems as well (volunteers
2881abd2a7SMartin Mareswanted; if you want to try that, I'll be very glad to see the patches and
2981abd2a7SMartin Maresinclude them in the next version).
30727ce158SMartin Mares
3155c815b5SMartin MaresThe utilities include:  (See manual pages for more details)
32b2c9b373SMartin Mares
3346ea554dSMartin Mares  - lspci: displays detailed information about all PCI buses and devices.
34b2c9b373SMartin Mares
35b2c9b373SMartin Mares  - setpci: allows to read from and write to PCI device configuration
36b2c9b373SMartin Mares    registers. For example, you can adjust the latency timers with it.
3707159913SMartin Mares    CAUTION: There is a couple of dangerous points and caveats, please read
3807159913SMartin Mares    the manual page first!
39b2c9b373SMartin Mares
401b95f396SMartin Mares  - update-pciids: download the current version of the pci.ids file.
411b95f396SMartin Mares
422f48f637SMartin Mares
4307159913SMartin Mares2. Compiling and (un)installing
4407159913SMartin Mares~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4507159913SMartin MaresJust run "make" to compile the package and then "make install" to install it.
46*d7ea742cSMartin MaresPlease note that GNU make is needed on most platforms.
47f3395cc5SMartin Mares
4807159913SMartin MaresIf you want to change the default installation location, please override
49f4ddb8d3SMartin Maresthe PREFIX variable specified in the Makefile -- e.g., you can use
50f4ddb8d3SMartin Mares"make PREFIX=/opt/pciutils install" to create a separate installation
51f4ddb8d3SMartin Maresnot interfering with the rest of your system.  Setting the DESTDIR variable
52f4ddb8d3SMartin Mareswill allow you to install to a different directory from the one you intend
53f4ddb8d3SMartin Maresto eventually run it from.  This is useful for people who are packaging
54f4ddb8d3SMartin Marespciutils to install on other computers.
5507159913SMartin Mares
56*d7ea742cSMartin MaresThere are several options which can be set in the Makefile or overridden
57*d7ea742cSMartin Mareswhen running make:
58*d7ea742cSMartin Mares
59*d7ea742cSMartin Mares  ZLIB=yes/no	Enable support for compressed pci.ids (requires zlib).
60*d7ea742cSMartin Mares		If it is enabled, pciutils will use pci.ids.gz in preference to
61*d7ea742cSMartin Mares		pci.ids, even if the pci.ids file is newer.  If the pci.ids.gz
62*d7ea742cSMartin Mares		file is missing, it will use pci.ids instead.  If you do not
63*d7ea742cSMartin Mares		specify this option, the configure script will try to guess
64*d7ea742cSMartin Mares		automatically based on the presence of zlib.
65*d7ea742cSMartin Mares
66*d7ea742cSMartin Mares  DNS=yes/no	Enable support for querying the central database of PCI ID's
67*d7ea742cSMartin Mares		using DNS.  Requires libresolv (which is available on most
68*d7ea742cSMartin Mares		systems as a part of the standard libraries) and tries to
69*d7ea742cSMartin Mares		autodetect its presence if the option is not specified.
70*d7ea742cSMartin Mares
71*d7ea742cSMartin Mares  SHARED=yes/	Build libpci as a shared library.  Requires the GNU toolchain.
72*d7ea742cSMartin Mares  no/local	The ABI of the shared library is intended to remain backward
73*d7ea742cSMartin Mares		compatible for a long time (we use symbol versioning to achieve
74*d7ea742cSMartin Mares		that, like GNU libc does).  The value `local' includes the
75*d7ea742cSMartin Mares		right directory name in the binaries, so the utilities can be
76*d7ea742cSMartin Mares		run without installation.  This is not recommended for any
77*d7ea742cSMartin Mares		production builds.
78*d7ea742cSMartin Mares
79*d7ea742cSMartin Mares"make install-lib" installs the library together with its header files
80*d7ea742cSMartin Maresfor use by other programs.
81cc062b4aSMartin Mares
8207159913SMartin MaresWhen you are bored of dumping PCI registers, just use "make uninstall".
8307159913SMartin Mares
8407159913SMartin Mares
8507159913SMartin Mares3. Getting new ID's
8607159913SMartin Mares~~~~~~~~~~~~~~~~~~~
8707159913SMartin MaresThe database of PCI ID's (the pci.ids file) gets out of date much faster
8807159913SMartin Maresthan I release new versions of this package.
8907159913SMartin Mares
9007159913SMartin MaresIf you are missing names for any of your devices or you just want to stay
9107159913SMartin Mareson the bleeding edge, download the most recent pci.ids file from
921b95f396SMartin Mareshttp://pciids.sf.net/ (e.g., by running the update-ids utility).
93a33d0eb7SMartin Mares
9414b85d7cSMartin MaresAlternatively, you can use `lspci -q' to query the central database
9514b85d7cSMartin Maresfor new entries via network.
9614b85d7cSMartin Mares
97a33d0eb7SMartin MaresIf your devices still appear as unknown, please send us their ID's and
98a33d0eb7SMartin Maresnames, the detailed instructions for submissions are listed on the
99a33d0eb7SMartin Maressf.net web page.
10007159913SMartin Mares
10107159913SMartin Mares
1020ac282f2SMartin Mares4. Getting new versions
1030ac282f2SMartin Mares~~~~~~~~~~~~~~~~~~~~~~~
1040ac282f2SMartin MaresNew versions of pciutils are available at the following places:
10507159913SMartin Mares
1060ac282f2SMartin Mares	ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/
1070ac282f2SMartin Mares	ftp://ftp.kernel.org/pub/software/utils/pciutils/ (expect a couple of hours delay)
1080ac282f2SMartin Mares	ftp://metalab.unc.edu/pub/Linux/hardware/ (expect a couple of days delay)
1090ac282f2SMartin Mares
1100ac282f2SMartin MaresThere is also a public GIT tree at:
1110ac282f2SMartin Mares
1120ac282f2SMartin Mares	git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
11307159913SMartin Mares
11407159913SMartin Mares
11507159913SMartin Mares5. Using the library
11607159913SMartin Mares~~~~~~~~~~~~~~~~~~~~
11714b85d7cSMartin MaresSo far, there is only a little documentation for the library except for the
11814b85d7cSMartin Maresgeneral introduction in the pcilib(7) man page. If you want to use the
11914b85d7cSMartin Mareslibrary in your programs, please follow the comments in lib/pci.h and in
12014b85d7cSMartin Maresthe example program lib/example.c.
12107159913SMartin Mares
12207159913SMartin Mares
12307159913SMartin Mares6. Feedback
12407159913SMartin Mares~~~~~~~~~~~
1252f48f637SMartin MaresIf you have any bug reports or suggestions, send them to the author.
1262f48f637SMartin Mares
12707159913SMartin MaresIf you have any new ID's, I'll be very glad to add them to the database, but
12807159913SMartin Maresplease take a look at http://pciids.sf.net/ first and follow the instructions.
12907159913SMartin Mares
1302f48f637SMartin MaresIf you want, subscribe to [email protected] (send
131783ed67dSMartin Mares"subscribe linux-pci" to [email protected]).
1322f48f637SMartin MaresRelease notes about new versions will be send to the list and problems with
1332f48f637SMartin Maresthe Linux PCI support will be probably discussed there, too.
1342f48f637SMartin Mares
13507159913SMartin Mares
13607159913SMartin Mares7. Miscellanea
13707159913SMartin Mares~~~~~~~~~~~~~~
138e4842ff3SMartin MaresYou also might want to look at the pciutils web page containing release
13913463566SMartin Maresnotes and other news: http://mj.ucw.cz/pciutils.shtml .
140e4842ff3SMartin Mares
1412bea6231SMartin MaresThere also exists a utility called PowerTweak which is able to fine tune
1422bea6231SMartin Maresparameters of many chipsets much better than the Bridge Optimization code
143783ed67dSMartin Maresin Linux kernel (already removed in 2.3.x). See http://powertweak.sf.net/
1442bea6231SMartin Maresfor more information.
1452bea6231SMartin Mares
14655c815b5SMartin Mares					Have fun
14755c815b5SMartin Mares							Martin
148