utility provides a command line interface to functionality provided by the
As such, some of the functions are only available to users with write
normally only the super-user.
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
The first column gives the
device name, unit number, and
If there is no device configured in the kernel for the
device in question, the device name will be
Unit numbers for unconfigured devices start at zero and are incremented for
each unconfigured device that is encountered.
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
Note that it will be 0 for older 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 chips revision.
The sixth column describes the header type.
Currently assigned header types include 0 for most devices,
bridges, and 2 for
If the most significant bit
of the header type register is set for
function 0 of a
device, it is a
device, which contains several (similar or independent) functions on
option is supplied,
will list any capabilities supported by each device.
Each capability will be enumerated via a line in the following format:
cap 10 = PCI-Express 1 root port
The first value after the
prefix is the capability ID in hexadecimal.
The second value in the square brackets is the offset of the capability
in config space in hexadecimal.
The format of the text after the equals sign is capability-specific.
option is supplied,
will attempt to load the vendor/device information database, and print
vendor, device, class and subclass identification strings for each device.
All invocations of
of the form
pci bus : device
(optionally followed by
A final colon may be appended and
will be ignored; this is so that the first column in the output of
can be used without modification.
All numbers are base 10.
determines whether any driver has been assigned to the device
An exit status of zero indicates that the device has a driver;
non-zero indicates that it does not.
option reads a configuration space register at byte offset
and prints out its value in hexadecimal.
The optional second address
specifies a range to read.
option writes the
into a configuration space register at byte offset
For both operations, the flags
select the width of the operation;
indicates a byte operation, and
indicates a halfword (two-byte) operation.
The default is to read or
write a longword (four bytes).