Skip site navigation (1)Skip section navigation (2)

FreeBSD Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
PCICONF(8)		FreeBSD	System Manager's Manual		    PCICONF(8)

     pciconf --	diagnostic utility for the PCI bus

     pciconf -l	[-v]
     pciconf -a	selector
     pciconf -r	selector [-b | -h] reg[:reg2]
     pciconf -w	selector [-b | -h] reg value

     The pciconf command provides a command line interface to the functional-
     ity provided by /dev/pci's	ioctl(2) interface.  With the -l option, it
     lists all devices found by	the boot probe in the following	format:

     foo0@pci0:4:0: class=0x010000 card=0x00000000 chip=0x000f1000 rev=0x01 hdr=0x00
     bar0@pci0:5:0: class=0x000100 card=0x00000000 chip=0x88c15333 rev=0x00 hdr=0x00
     none0@pci0:6:0: class=0x020000 card=0x00000000 chip=0x802910ec rev=0x00 hdr=0x00

     If	the -v option is supplied, pciconf will	attempt	to load	the ven-
     dor/device	information database, and print	vendor,	device,	class and sub-
     class identification strings for each device.

     The first column gives the	device name, unit number, and selector.	 If
     there is no device	configured in the kernel for the PCI device in ques-
     tion, the device name will	be ``none''.  Unit numbers for unconfigured
     devices start at zero and are incremented for each	unconfigured device
     that is encountered.  The selector	is in a	form which may directly	be
     used for the other	forms of the command.  The second column is the	class
     code, with	the class byte printed as two hex digits, followed by the sub-
     class and the interface bytes.  The third column gives the	contents of
     the subvendorid register, introduced in revision 2.1 of the PCI standard.
     It	is 0 for most current (2.0) PCI	cards, but is supposed to be loaded
     with a unique card	identification code in newly developed PCI cards.  The
     field consists of the card	ID in the upper	half and the card vendor ID in
     the lower half of the value.

     The fourth	column contains	the chip device	ID, which identifies the chip
     this card is based	on.  It	consists of two	fields,	identifying the	chip
     and its vendor, as	above.	The fifth column prints	the chip's revision.
     The sixth column describes	the header type.  Currently assigned header
     types are 0 for all devices except	PCI to PCI bridges, and	1 for such
     bridge chips.  If the most	significant bit	of the header type register is
     set for function 0	of a PCI device, it is a multi-function	device,	which
     contains several (similar or independent) functions on one	chip.

     The -l option is the only one available to	non-root users.	 All other
     invocations of pciconf require a selector of the form pcibus:device
     (optionally followed by :function).  A final colon	may be appended	and
     will be ignored; this is so that the first	column in the output of
     pciconf -l	can be used without modification.  All numbers are base	10.

     With the -a flag, pciconf determines whether any driver has been assigned
     to	the device identified by selector.  An exit status of zero indicates
     that the device has a driver; non-zero indicates that it does not.

     The -r option reads a configuration space register	at byte	offset reg of
     device selector and prints	out its	value in hexadecimal.  The optional
     second reg2 specifies a range to read.  The -w option writes the value
     into a configuration space	register at byte offset	reg of device
     selector.	For both operations, the flags -b and -h select	the width of
     the operation; -b indicates a byte	operation, and -h indicates a halfword
     (two-byte)	operation.  The	default	is to read or write a longword (four

     The PCI vendor/device information database	is normally read from
     /usr/share/misc/pci_vendors.  This	path can be overridden by setting the
     environment variable PCICONF_VENDOR_DATABASE.

     ioctl(2), kldload(8)

     The pciconf command appeared first	in FreeBSD 2.2.	 The -a	option was
     added for PCI KLD support in FreeBSD 3.0.

     The pciconf facility was written by Stefan	Esser and Garrett Wollman.

     The -b and	-h options are implemented in pciconf, but not in the underly-
     ing ioctl(2).

     It	might be useful	to give	non-root users access to the -a	and -r
     options.  But only	root will be able to execute a kldload to provide the
     device with a driver KLD, and reading of configuration space registers
     may cause a failure in badly designed PCI chips.

FreeBSD	10.3		       February	7, 1997			  FreeBSD 10.3


Want to link to this manual page? Use this URL:

home | help