|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| compat/ | H | 25-Apr-2025 | - | 838 | 430 |
| lib/ | H | 25-Apr-2025 | - | 18,515 | 14,096 |
| lmr/ | H | 25-Apr-2025 | - | 1,915 | 1,531 |
| maint/ | H | 25-Apr-2025 | - | 479 | 408 |
| tests/ | H | 25-Apr-2025 | - | 21,485 | 21,300 |
| .gitignore | H A D | 25-Apr-2025 | 80 | 12 | 11 |
| Android.bp | H A D | 25-Apr-2025 | 3.4 KiB | 122 | 111 |
| COPYING | H A D | 25-Apr-2025 | 17.6 KiB | 340 | 281 |
| ChangeLog | H A D | 25-Apr-2025 | 78.7 KiB | 2,473 | 1,527 |
| LICENSE | H A D | 25-Apr-2025 | 17.6 KiB | 340 | 281 |
| METADATA | H A D | 25-Apr-2025 | 615 | 20 | 18 |
| Makefile | H A D | 25-Apr-2025 | 8.2 KiB | 257 | 196 |
| OWNERS | H A D | 25-Apr-2025 | 71 | 4 | 2 |
| README | H A D | 25-Apr-2025 | 5.6 KiB | 154 | 111 |
| README.Windows | H A D | 25-Apr-2025 | 3.9 KiB | 71 | 56 |
| TODO | H A D | 25-Apr-2025 | 504 | 23 | 18 |
| bitops.h | H A D | 25-Apr-2025 | 1.1 KiB | 40 | 15 |
| common.c | H A D | 25-Apr-2025 | 2.7 KiB | 137 | 116 |
| example.c | H A D | 25-Apr-2025 | 1.4 KiB | 38 | 24 |
| ls-caps-vendor.c | H A D | 25-Apr-2025 | 1.6 KiB | 85 | 63 |
| ls-caps.c | H A D | 25-Apr-2025 | 56 KiB | 1,905 | 1,734 |
| ls-ecaps.c | H A D | 25-Apr-2025 | 56.4 KiB | 1,870 | 1,586 |
| ls-kernel.c | H A D | 25-Apr-2025 | 5.6 KiB | 299 | 234 |
| ls-map.c | H A D | 25-Apr-2025 | 4.3 KiB | 185 | 160 |
| ls-tree.c | H A D | 25-Apr-2025 | 11.2 KiB | 469 | 387 |
| ls-vpd.c | H A D | 25-Apr-2025 | 4.9 KiB | 225 | 178 |
| lspci.c | H A D | 25-Apr-2025 | 35.3 KiB | 1,232 | 1,097 |
| lspci.h | H A D | 25-Apr-2025 | 2.7 KiB | 110 | 57 |
| lspci.man | H A D | 25-Apr-2025 | 10.8 KiB | 372 | 328 |
| pci.ids | H A D | 25-Apr-2025 | 1.4 MiB | 38,221 | 38,213 |
| pci.ids.man | H A D | 25-Apr-2025 | 3.7 KiB | 98 | 77 |
| pcilib.man | H A D | 25-Apr-2025 | 10.1 KiB | 267 | 252 |
| pcilmr.c | H A D | 25-Apr-2025 | 6.3 KiB | 221 | 180 |
| pcilmr.man | H A D | 25-Apr-2025 | 8.3 KiB | 265 | 248 |
| pciutils.h | H A D | 25-Apr-2025 | 1.9 KiB | 66 | 38 |
| pciutils.lsm | H A D | 25-Apr-2025 | 547 | 14 | 13 |
| pciutils.spec | H A D | 25-Apr-2025 | 1.2 KiB | 50 | 40 |
| setpci.c | H A D | 25-Apr-2025 | 20.4 KiB | 836 | 743 |
| setpci.man | H A D | 25-Apr-2025 | 6.4 KiB | 192 | 177 |
| update-pciids.man | H A D | 25-Apr-2025 | 790 | 39 | 30 |
| update-pciids.sh | H A D | 25-Apr-2025 | 2.1 KiB | 98 | 77 |
README
1This package contains the PCI Utilities, version @VERSION@.
2
3Copyright (c) 1997--2024 Martin Mares <[email protected]>
4
5All files in this package can be freely distributed and used according
6to the terms of the GNU General Public License, either version 2 or
7(at your opinion) any newer version. See https://www.gnu.org/ for details.
8
9The author wants to clarify that he does not consider programs which link
10dynamically to the libpci to be derived works of the library.
11
12
131. What's that?
14~~~~~~~~~~~~~~~
15The PCI Utilities package contains a library for portable access to PCI bus
16configuration registers and several utilities based on this library.
17
18In runs on the following systems:
19
20 Linux (via /sys/bus/pci, /proc/bus/pci or i386 ports)
21 FreeBSD (via /dev/pci)
22 NetBSD (via libpci)
23 OpenBSD (via /dev/pci or i386 ports)
24 GNU/kFreeBSD (via /dev/pci)
25 Solaris/i386 (direct port access)
26 Aix (via /dev/pci and odmget)
27 GNU Hurd (direct port access)
28 Windows (via cfgmgr32 or direct port access, see README.Windows for caveats)
29 CYGWIN (direct port access)
30 BeOS (via syscalls)
31 Haiku (via /dev/misc/poke)
32 Darwin (via IOKit)
33 DOS/DJGPP (via i386 ports)
34 SylixOS (via /proc/pci)
35 AmigaOS on PPC (via Expansion library)
36
37It should be very easy to add support for other systems as well (volunteers
38wanted; if you want to try that, I'll be very glad to see the patches and
39include them in the next version).
40
41The utilities include: (See manual pages for more details)
42
43 - lspci: displays detailed information about all PCI buses and devices.
44
45 - setpci: allows to read from and write to PCI device configuration
46 registers. For example, you can adjust the latency timers with it.
47 CAUTION: There is a couple of dangerous points and caveats, please read
48 the manual page first!
49
50 - update-pciids: download the current version of the pci.ids file.
51
52 - pcilmr: performs margining on PCIe links.
53
54
552. Compiling and (un)installing
56~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57Just run "make" to compile the package and then "make install" to install it.
58Please note that a C compiler supporting the C99 standard is required.
59Also, GNU make is needed on most platforms.
60
61If you want to change the default installation location, please override
62the PREFIX variable specified in the Makefile -- e.g., you can use
63"make PREFIX=/opt/pciutils install" to create a separate installation
64not interfering with the rest of your system. Setting the DESTDIR variable
65will allow you to install to a different directory from the one you intend
66to eventually run it from. This is useful for people who are packaging
67pciutils to install on other computers.
68
69There are several options which can be set in the Makefile or overridden
70when running make:
71
72 ZLIB=yes/no Enable support for compressed pci.ids (requires zlib).
73 If it is enabled, pciutils will use pci.ids.gz in preference to
74 pci.ids, even if the pci.ids file is newer. If the pci.ids.gz
75 file is missing, it will use pci.ids instead. If you do not
76 specify this option, the configure script will try to guess
77 automatically based on the presence of zlib.
78
79 DNS=yes/no Enable support for querying the central database of PCI IDs
80 using DNS. Requires libresolv (which is available on most
81 systems as a part of the standard libraries) and tries to
82 autodetect its presence if the option is not specified.
83
84 SHARED=yes/ Build libpci as a shared library. Requires GCC 4.0 or newer.
85 no/local The ABI of the shared library is intended to remain backward
86 compatible for a long time (we use symbol versioning to achieve
87 that, like GNU libc does). The value `local' includes the
88 right directory name in the binaries, so the utilities can be
89 run without installation. This is not recommended for any
90 production builds.
91
92"make install-lib" installs the library together with its header files
93for use by other programs.
94
95When you are bored of dumping PCI registers, just use "make uninstall".
96
97
983. Getting new IDs
99~~~~~~~~~~~~~~~~~~~
100The database of PCI IDs (the pci.ids file) gets out of date much faster
101than I release new versions of this package, so it is maintained separately.
102
103It lives at https://pci-ids.ucw.cz/, where you can browse the database,
104download the most recent pci.ids file (e.g., by running the update-ids utility)
105and also submit new entries.
106
107Alternatively, you can use `lspci -q' to query the central database
108for new entries via network.
109
110The pci.ids file is also mirrored at https://github.com/pciutils/pciids.
111
112On Linux systems with a recent enough version of libudev, UDEV's HWDB
113database is consulted when pci.ids lacks the device.
114
115
1164. Getting new versions
117~~~~~~~~~~~~~~~~~~~~~~~
118The current version of pciutils is available at:
119
120 https://mj.ucw.cz/sw/pciutils/
121
122The tarball can be downloaded at the following places:
123
124 https://mj.ucw.cz/download/linux/pci/
125 ftp://ftp.ucw.cz/pub/mj/linux/pci/
126 https://www.kernel.org/pub/software/utils/pciutils/ (expect a couple of hours delay)
127
128There is also a public GIT tree at:
129
130 https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
131 https://github.com/pciutils/pciutils
132
133
1345. Using the library
135~~~~~~~~~~~~~~~~~~~~
136So far, there is only a little documentation for the library except for the
137general introduction in the pcilib(7) man page. If you want to use the
138library in your programs, please follow the comments in lib/pci.h and in
139the example program example.c.
140
141
1426. Feedback
143~~~~~~~~~~~
144If you have any bug reports or suggestions, send them to the author.
145
146If you have any new IDs, I'll be very glad to add them to the database.
147Just submit them at https://pci-ids.ucw.cz/.
148
149Announcements of new versions are sent to [email protected]
150(see http://vger.kernel.org/ for instructions).
151
152 Have fun
153 Martin
154
README.Windows
1Since 2.1.99-test5, pciutils should also be compilable on Windows. Thanks
2to Alexander Stock for contributing the port.
3
4Updated after version 2.2.6 to compile again, and with MinGW, even (only?)
5cross-compiling. (Hopefully it works with MSVC too.)
6
7For simple listing PCI devices in system via win32-cfgmgr32 access method
8which provides only basic information and emulated config space, there is no
9special requirement. To list PCI resources on Windows 8 and higher versions,
10it is necessary to have architecture-native version (e.g. AMD64 version on
11AMD64 systems).
12
13For config space access there are different windows specific access methods:
14- win32-kldbg - Kernel Local Debugging Driver kldbgdrv.sys
15- win32-sysdbg - NT SysDbg interface
16- intel-conf1 - Direct hardware access via Intel configuration mechanism 1
17
18The default access method is win32-cfgmgr32 and by default it tries to use
19one of the above config access access method to provide as much as possible
20information to application. More details about particular access method and
21caveats are described in the pcilib(8) manual page.
22
23The default access method for config space is win32-kldbg. It uses Microsoft's
24Kernel Local Debugging Driver kldbgdrv.sys. This driver is not part of the
25Windows system but is part of the Microsoft WinDbg tool. It is required to
26have kldbgdrv.sys driver installed in the system32 directory or to have
27windbg.exe or kd.exe binary in PATH. kldbgdrv.sys driver has some restrictions.
28Process needs to have Debug privilege and Windows system has to be booted with
29Debugging option. Debugging option can be enabled by calling (takes effect
30after next boot): bcdedit /debug on
31
32Download links for WinDbg 6.12.2.633 standalone installer from Microsoft:
33https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi
34https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools/dbg_x86.msi
35
36To access config space via intel-conf1 access method on NT-based systems via
37NT ProcessUserModeIOPL system call, it is required to have SeTcbPrivilege
38(Act as part of the operating system privilege), which can be enabled in User
39Accounts settings (take effect after next login). By default this privilege is
40not enabled for any non-system user. Or alternatively it is required to be in
41local Administrators group and on Windows 2000 SP4 or higher systems to have
42SeImpersonatePrivilege (Impersonate a client after authentication privilege)
43which is by default enabled for all local Administrators accounts. There is no
44special requirement for DOS-based systems. 64-bit systems do not have to allow
45users to access config space even with SeTcbPrivilege.
46
47To compile this port, run following command:
48
49 make CROSS_COMPILE=i586-mingw32msvc- HOST=i586-windows ZLIB=no IDSDIR=""
50
51To build 64-bit version, run:
52
53 make CROSS_COMPILE=x86_64-w64-mingw32- HOST=x86_64-windows ZLIB=no IDSDIR=""
54
55Sometimes compilation may fail due to broken or missing getopt implementation.
56In this case try to compile with additional make option: COMPAT_GETOPT=yes
57
58Building of shared DLL library libpci3.dll is supported too but needs to be
59manually enabled by make option: SHARED=yes
60
61This DLL library libpci3.dll has versioned symbols with stable ordinal numbers
62which provides backward and forward compatibility. Every symbol in DLL library
63has '@LIBPCI_3.<version>' suffix to achieve it. For linking application to
64libpci3.dll it is possible to generate import library from libpci3.def file.
65Such import library will provide import symbol names without versioned suffix
66as an alias for the latest symbol version, which matches function name in pci.h
67header file. The alias is resolved by the linker at linking time, so the final
68application binary would always reference only versioned symbol. DLL library
69libpci3.dll does not provide unversioned symbols, so for using GetProcAddress()
70or dlsym() it is needed to specify full versioned symbol name.
71