]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
Added a man page for pci.ids
authorMartin Mares <mj@ucw.cz>
Tue, 21 Jan 2020 22:56:47 +0000 (23:56 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 21 Jan 2020 22:56:47 +0000 (23:56 +0100)
Makefile
lspci.man
pci.ids.man [new file with mode: 0644]
pcilib.man

index ff51be1cdbe02c66489c596875de03a7a9ebe2f4..26d6f5d5131054a178fdcc0d88c7dea85c017f9e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ PCIINC_INS=lib/config.h lib/header.h lib/pci.h lib/types.h
 
 export
 
-all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS)
+all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 pci.ids.5 update-pciids update-pciids.8 $(PCI_IDS)
 
 lib/$(PCILIB): $(PCIINC) force
        $(MAKE) -C lib all
@@ -98,7 +98,7 @@ example.o: example.c $(PCIINC)
 %: %.o
        $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@
 
-%.8 %.7: %.man
+%.8 %.7 %.5: %.man
        M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#"
 
 ctags:
@@ -118,12 +118,13 @@ distclean: clean
 
 install: all
 # -c is ignored on Linux, but required on FreeBSD
-       $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7
+       $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7 $(DESTDIR)/$(MANDIR)/man5
        $(INSTALL) -c -m 755 $(STRIP) lspci setpci $(DESTDIR)$(SBINDIR)
        $(INSTALL) -c -m 755 update-pciids $(DESTDIR)$(SBINDIR)
        $(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR)
        $(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8
        $(INSTALL) -c -m 644 pcilib.7 $(DESTDIR)$(MANDIR)/man7
+       $(INSTALL) -c -m 644 pci.ids.5 $(DESTDIR)$(MANDIR)/man5
 ifeq ($(SHARED),yes)
 ifeq ($(LIBEXT),dylib)
        ln -sf $(PCILIB) $(DESTDIR)$(LIBDIR)/$(LIBNAME)$(ABI_VERSION).$(LIBEXT)
index 6850a28d74f107a01d67cd3b3c11a624f7342724..a43831cc1a8f2ba21b3284af283dec6ca90eee0a 100644 (file)
--- a/lspci.man
+++ b/lspci.man
@@ -357,6 +357,7 @@ back-end.
 
 .SH SEE ALSO
 .BR setpci (8),
+.BR pci.ids (5),
 .BR update-pciids (8),
 .BR pcilib (7)
 
diff --git a/pci.ids.man b/pci.ids.man
new file mode 100644 (file)
index 0000000..b8385d0
--- /dev/null
@@ -0,0 +1,92 @@
+.TH pci.ids 5 "@TODAY@" "@VERSION@" "The PCI Utilities"
+
+.SH NAME
+pci.ids \- list of known identifiers related to PCI devices
+
+.SH INTRODUCTION
+Devices on the PCI bus are identified by a combination
+of a vendor ID (assigned by the PCI SIG) and device ID
+(assigned by the vendor). Both IDs are 16-bit integers
+and the device itself provides no translation to a human-readable
+string.
+
+In addition to the vendor and device, devices also report several
+other identifiers:
+
+.IP \(bu 3
+Device class and subclass (two 8-bit numbers)
+
+.IP \(bu 3
+Programming interface (8-bit number, meaning specific for the subclass)
+
+.IP \(bu 3
+Subsystem, which identifies the assembly in which the device is contained.
+A typical example is an Ethernet add-in card: the device is the Ethernet
+controller chip, while the card plays the role of the subsystem. Subsystems
+have their vendor ID (from the same namespace as device vendors) and subsystem
+ID. Generally, the meaning of the subsystem ID depends on the device, but there
+are cases in which a single subsystem ID is used for many devices - e.g.,
+laptop motherboards.
+
+The PCI utilities use the
+.B pci.ids
+file to translate all these numeric IDs to strings.
+
+.SH KEEPING THE LIST UP-TO-DATE
+The
+.B pci.ids
+file is generated from the PCI ID database, which is maintained at
+.UR https://pci-ids.ucw.cz/
+.UE .
+If you find any IDs missing from the list, please contribute them
+to the database.
+
+You can use the
+.B update-pciids
+command to download the current version of the list.
+
+Alternatively, you can use
+.B lspci -q
+to query the database online.
+
+.SH FILE FORMAT
+The pci.ids file is a text file in plain ASCII, interpreted line by line.
+Lines starting with the hash sign are treated as comments are ignored.
+Comments regarding a specific entry are written immediately before the entry.
+
+Vendor entries start with a 4-digit hexadecimal vendor ID, followed by one
+or more spaces, and the name of the vendor extending to the end of the line.
+
+Device entries are placed below the vendor entry. Each device entry consists
+of a single TAB character, a 4-digit hexadecimal device ID, followed by one or more
+spaces, and the name of the device extending to the end of the line.
+
+Subsystem entries are placed below the device entry. They start with two TAB
+characters, a 4-digit hexadecimal vendor ID (which must be defined elsewhere in
+the list), a single space, a 4-digit hexadecimal subsystem ID, one or more
+spaces, and the name of the subsystem extending to the end of the line.
+
+Class entries consist of "C", one space, 2-digit hexadecimal class ID, one or
+more spaces, and the name of the class. Subclasses are placed below the
+corresponding class, indented by a single TAB, followed by a 2-digit
+hexadecimal subclass ID, one or more spaces, and the name of the subclass.
+Programming interfaces are below the subclass, indented by two TABs, followed
+by a 2-digit hexadecimal prog-if ID, one or more spaces, and the name.
+
+There can be device-independent subsystem IDs, although the web interface of
+the database does not support them yet. They start with a subsystem vendor line
+consisting of "S", one space, and a 4-digit hexadecimal vendor ID (which must
+correspond to an already listed vendor). Subsystems follow on subsequent lines,
+each indented by one TAB, followed by a 4-digit hexadecimal subsystem ID, one
+or more spaces, and the name of the subsystem.
+
+To ensure extensibility of the format, lines starting with an unrecognized letter
+followed by a single space are ignored and so are all following TAB-indented lines.
+
+.SH SEE ALSO
+.BR lspci (8),
+.BR update-pciids (8),
+.BR pcilib (7)
+
+.SH AUTHOR
+The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
index 8eb651bbdbe4abc2ff22cd3881cf5df8148289c3..adcbeb63d51f7d9c029a81fdd4d9508267e199fb 100644 (file)
@@ -112,6 +112,7 @@ Disable use of HWDB if set to a non-zero value.
 
 .BR lspci (8),
 .BR setpci (8),
+.BR pci.ids (5),
 .BR update-pciids (8)
 
 .SH AUTHOR