1997-02-11 22:08:22 +00:00
|
|
|
.\" Copyright (c) 1997
|
2001-08-13 16:33:00 +00:00
|
|
|
.\" Stefan Esser <se@FreeBSD.org>. All rights reserved.
|
1997-02-11 22:08:22 +00:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\"
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
2003-05-22 11:55:26 +00:00
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2015-11-23 23:48:07 +00:00
|
|
|
.Dd November 23, 2015
|
1997-02-11 22:08:22 +00:00
|
|
|
.Dt PCICONF 8
|
2001-07-10 15:12:08 +00:00
|
|
|
.Os
|
1997-02-11 22:08:22 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm pciconf
|
|
|
|
.Nd diagnostic utility for the PCI bus
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2015-11-23 23:48:07 +00:00
|
|
|
.Fl l Oo Fl BbceVv Oc Op Ar device
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2014-01-20 15:51:02 +00:00
|
|
|
.Fl a Ar device
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2014-01-20 15:51:02 +00:00
|
|
|
.Fl r Oo Fl b | h Oc Ar device addr Ns Op : Ns Ar addr2
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2014-01-20 15:51:02 +00:00
|
|
|
.Fl w Oo Fl b | h Oc Ar device addr value
|
1997-02-11 22:08:22 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
1997-10-06 11:38:30 +00:00
|
|
|
.Nm
|
2003-01-09 04:35:38 +00:00
|
|
|
utility provides a command line interface to functionality provided by the
|
2002-12-14 18:07:13 +00:00
|
|
|
.Xr pci 4
|
1997-02-11 22:08:22 +00:00
|
|
|
.Xr ioctl 2
|
|
|
|
interface.
|
2004-01-06 20:23:20 +00:00
|
|
|
As such, some of the functions are only available to users with write
|
|
|
|
access to
|
2002-12-14 18:07:13 +00:00
|
|
|
.Pa /dev/pci ,
|
2003-01-09 04:35:38 +00:00
|
|
|
normally only the super-user.
|
2002-12-14 18:07:13 +00:00
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
With the
|
1997-02-11 22:08:22 +00:00
|
|
|
.Fl l
|
2014-01-20 15:51:02 +00:00
|
|
|
option,
|
|
|
|
.Nm
|
|
|
|
lists PCI devices in the following format:
|
1997-02-11 22:08:22 +00:00
|
|
|
.Bd -literal
|
2007-09-30 11:05:18 +00:00
|
|
|
foo0@pci0:0:4:0: class=0x010000 card=0x00000000 chip=0x000f1000 rev=0x01 \
|
|
|
|
hdr=0x00
|
|
|
|
bar0@pci0:0:5:0: class=0x000100 card=0x00000000 chip=0x88c15333 rev=0x00 \
|
|
|
|
hdr=0x00
|
|
|
|
none0@pci0:0:6:0: class=0x020000 card=0x00000000 chip=0x802910ec rev=0x00 \
|
|
|
|
hdr=0x00
|
1997-02-11 22:08:22 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
The first column gives the
|
2014-01-20 15:51:02 +00:00
|
|
|
driver name, unit number, and selector .
|
|
|
|
If there is no driver attached to the
|
1998-11-12 00:22:30 +00:00
|
|
|
.Tn PCI
|
2014-01-20 15:51:02 +00:00
|
|
|
device in question, the driver name will be
|
1998-11-12 00:22:30 +00:00
|
|
|
.Dq none .
|
2014-01-20 15:51:02 +00:00
|
|
|
Unit numbers for detached devices start at zero and are incremented for
|
|
|
|
each detached device that is encountered.
|
|
|
|
The selector
|
1998-11-12 00:22:30 +00:00
|
|
|
is in a form which may directly be used for the other forms of the command.
|
1997-02-11 22:08:22 +00:00
|
|
|
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.
|
2001-07-15 08:06:20 +00:00
|
|
|
The third column gives the contents of the subvendorid register, introduced
|
|
|
|
in revision 2.1 of the
|
1997-02-11 22:08:22 +00:00
|
|
|
.Tn PCI
|
2000-03-01 14:09:25 +00:00
|
|
|
standard.
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
Note that it will be 0 for older cards.
|
2000-03-01 14:09:25 +00:00
|
|
|
The field consists of the card ID in the upper
|
1997-02-11 22:08:22 +00:00
|
|
|
half and the card vendor ID in the lower half of the value.
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
The fourth column contains the chip device ID, which identifies the chip
|
2000-03-01 14:09:25 +00:00
|
|
|
this card is based on.
|
2001-07-15 08:06:20 +00:00
|
|
|
It consists of two fields, identifying the chip and
|
1997-02-11 22:08:22 +00:00
|
|
|
its vendor, as above.
|
|
|
|
The fifth column prints the chip's revision.
|
2001-07-15 08:06:20 +00:00
|
|
|
The sixth column describes the header type.
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
Currently assigned header types include 0 for most devices,
|
2007-02-06 08:46:20 +00:00
|
|
|
1 for
|
1997-02-11 22:08:22 +00:00
|
|
|
.Tn PCI
|
|
|
|
to
|
|
|
|
.Tn PCI
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
bridges, and 2 for
|
|
|
|
.Tn PCI
|
|
|
|
to
|
|
|
|
.Tn CardBus
|
|
|
|
bridges.
|
2000-03-01 14:09:25 +00:00
|
|
|
If the most significant bit
|
2001-07-15 08:06:20 +00:00
|
|
|
of the header type register is set for
|
|
|
|
function 0 of a
|
|
|
|
.Tn PCI
|
1997-02-11 22:08:22 +00:00
|
|
|
device, it is a
|
|
|
|
.Em multi-function
|
2001-07-15 08:06:20 +00:00
|
|
|
device, which contains several (similar or independent) functions on
|
1997-02-11 22:08:22 +00:00
|
|
|
one chip.
|
|
|
|
.Pp
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
If the
|
2015-11-23 23:48:07 +00:00
|
|
|
.Fl B
|
|
|
|
option is supplied,
|
|
|
|
.Nm
|
|
|
|
will list additional information for
|
|
|
|
.Tn PCI
|
|
|
|
to
|
|
|
|
.Tn PCI
|
|
|
|
and
|
|
|
|
.Tn PCI
|
|
|
|
to
|
|
|
|
.Tn CardBus
|
|
|
|
bridges,
|
|
|
|
specifically the resource ranges decoded by the bridge for use by devices
|
|
|
|
behind the bridge.
|
|
|
|
Each bridge lists a range of bus numbers handled by the bridge and its
|
|
|
|
downstream devices.
|
|
|
|
Memory and I/O port decoding windows are enumerated via a line in the
|
|
|
|
following format:
|
|
|
|
.Bd -literal
|
|
|
|
window[1c] = type I/O Port, range 16, addr 0x5000-0x8fff, enabled
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The first value after the
|
|
|
|
.Dq Li window
|
|
|
|
prefix in the square brackets is the offset of the decoding window in
|
|
|
|
config space in hexadecimal.
|
|
|
|
The type of a window is one of
|
|
|
|
.Dq Memory ,
|
|
|
|
.Dq Prefetchable Memory ,
|
|
|
|
or
|
|
|
|
.Dq I/O Port .
|
|
|
|
The range indicates the binary log of the maximum address the window decodes.
|
|
|
|
The address field indicates the start and end addresses of the decoded range.
|
|
|
|
Finally, the last flag indicates if the window is enabled or disabled.
|
|
|
|
.Pp
|
|
|
|
If the
|
2009-02-02 19:54:16 +00:00
|
|
|
.Fl b
|
|
|
|
option is supplied,
|
|
|
|
.Nm
|
|
|
|
will list any base address registers
|
|
|
|
.Pq BARs
|
|
|
|
that are assigned resources for each device.
|
|
|
|
Each BAR will be enumerated via a line in the following format:
|
|
|
|
.Bd -literal
|
|
|
|
bar [10] = type Memory, range 32, base 0xda060000, size 131072, enabled
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The first value after the
|
|
|
|
.Dq Li bar
|
|
|
|
prefix in the square brackets is the offset of the BAR in config space in
|
|
|
|
hexadecimal.
|
|
|
|
The type of a BAR is one of
|
|
|
|
.Dq Memory ,
|
|
|
|
.Dq Prefetchable Memory ,
|
|
|
|
or
|
|
|
|
.Dq I/O Port .
|
2015-11-23 23:48:07 +00:00
|
|
|
The range indicates the binary log of the maximum address the BAR decodes.
|
2009-02-02 19:54:16 +00:00
|
|
|
The base and size indicate the start and length of the BAR's address window,
|
|
|
|
respectively.
|
|
|
|
Finally, the last flag indicates if the BAR is enabled or disabled.
|
|
|
|
.Pp
|
|
|
|
If the
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
.Fl c
|
|
|
|
option is supplied,
|
|
|
|
.Nm
|
|
|
|
will list any capabilities supported by each device.
|
2010-09-09 18:51:20 +00:00
|
|
|
Each capability is enumerated via a line in the following format:
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
.Bd -literal
|
|
|
|
cap 10[40] = PCI-Express 1 root port
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The first value after the
|
2007-02-06 08:46:20 +00:00
|
|
|
.Dq Li cap
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
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.
|
|
|
|
.Pp
|
2010-09-09 18:51:20 +00:00
|
|
|
Each extended capability is enumerated via a line in a similar format:
|
|
|
|
.Bd -literal
|
|
|
|
ecap 0002[100] = VC 1 max VC0
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The first value after the
|
|
|
|
.Dq Li ecap
|
|
|
|
prefix is the extended capability ID in hexadecimal.
|
|
|
|
The second value in the square brackets is the offset of the extended
|
|
|
|
capability in config space in hexadecimal.
|
|
|
|
The format of the text after the equals sign is capability-specific.
|
|
|
|
.Pp
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
If the
|
2012-06-01 18:33:40 +00:00
|
|
|
.Fl e
|
|
|
|
option is supplied,
|
|
|
|
.Nm
|
|
|
|
will list any errors reported for this device in standard PCI error registers.
|
|
|
|
Errors are checked for in the PCI status register,
|
|
|
|
the PCI-express device status register,
|
|
|
|
and the Advanced Error Reporting status registers.
|
|
|
|
.Pp
|
|
|
|
If the
|
- Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l. Some simple parsing code is
present for the following capabilities: Power Management, AGP, VPD,
MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
- PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
fairly common at this point, so reflect that.
- Header type 2 is used for PCI-CardBus bridges.
- Describe the -v option for -l after completing the basic -l description
instead of disrupting the flow in the middle.
Reviewed by: imp (partially)
MFC after: 1 week
2007-02-02 19:54:17 +00:00
|
|
|
.Fl v
|
|
|
|
option is supplied,
|
|
|
|
.Nm
|
|
|
|
will attempt to load the vendor/device information database, and print
|
|
|
|
vendor, device, class and subclass identification strings for each device.
|
|
|
|
.Pp
|
2014-01-20 20:56:09 +00:00
|
|
|
If the
|
|
|
|
.Fl V
|
|
|
|
option is supplied,
|
|
|
|
.Nm
|
|
|
|
will list any vital product data
|
|
|
|
.Pq VPD
|
|
|
|
provided by each device.
|
|
|
|
Each VPD keyword is enumerated via a line in the following format:
|
|
|
|
.Bd -literal
|
|
|
|
VPD ro PN = '110114640C0 '
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The first string after the
|
|
|
|
.Dq Li VPD
|
|
|
|
prefix indicates if the keyword is read-only
|
|
|
|
.Dq ro
|
|
|
|
or read-write
|
|
|
|
.Dq rw .
|
|
|
|
The second string provides the keyword name.
|
2016-05-17 12:52:31 +00:00
|
|
|
The text after the equals sign lists the value of the keyword which is
|
2014-01-20 20:56:09 +00:00
|
|
|
usually an ASCII string.
|
|
|
|
.Pp
|
2014-01-20 15:51:02 +00:00
|
|
|
If the optional
|
|
|
|
.Ar device
|
|
|
|
argument is given with the
|
|
|
|
.Fl l
|
|
|
|
flag,
|
|
|
|
.Nm
|
|
|
|
will only list details about a single device instead of all devices.
|
|
|
|
.Pp
|
2002-12-14 18:07:13 +00:00
|
|
|
All invocations of
|
1997-10-06 11:38:30 +00:00
|
|
|
.Nm
|
2002-12-14 18:07:13 +00:00
|
|
|
except for
|
|
|
|
.Fl l
|
1997-02-11 22:08:22 +00:00
|
|
|
require a
|
2014-01-20 15:51:02 +00:00
|
|
|
.Ar device .
|
|
|
|
The device can be identified either by a device name if the device is
|
|
|
|
attached to a driver or by a selector.
|
|
|
|
Selectors identify a PCI device by its address in PCI config space and
|
|
|
|
can take one of the following forms:
|
|
|
|
.Pp
|
|
|
|
.Bl -bullet -offset indent -compact
|
|
|
|
.It
|
2007-10-04 22:18:53 +00:00
|
|
|
.Li pci Ns Va domain Ns \&: Ns Va bus Ns \&: Ns Va device Ns \&: \
|
2014-01-20 15:51:02 +00:00
|
|
|
Ns Va function Ns
|
|
|
|
.It
|
|
|
|
.Li pci Ns Va bus Ns \&: Ns Va device Ns \&: Ns Va function Ns
|
|
|
|
.It
|
|
|
|
.Li pci Ns Va bus Ns \&: Ns Va device Ns
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
In the case of an abridged form, omitted selector components are assumed to be 0.
|
2012-03-29 05:02:12 +00:00
|
|
|
An optional leading device name followed by @ and an optional final colon
|
1997-02-11 22:08:22 +00:00
|
|
|
will be ignored; this is so that the first column in the output of
|
1997-10-06 11:38:30 +00:00
|
|
|
.Nm
|
1997-02-11 22:08:22 +00:00
|
|
|
.Fl l
|
2002-12-14 18:07:13 +00:00
|
|
|
can be used without modification.
|
|
|
|
All numbers are base 10.
|
1997-02-11 22:08:22 +00:00
|
|
|
.Pp
|
|
|
|
With the
|
|
|
|
.Fl a
|
|
|
|
flag,
|
1997-10-06 11:38:30 +00:00
|
|
|
.Nm
|
1997-02-11 22:08:22 +00:00
|
|
|
determines whether any driver has been assigned to the device
|
2001-07-15 08:06:20 +00:00
|
|
|
identified by
|
1997-02-11 22:08:22 +00:00
|
|
|
.Ar selector .
|
|
|
|
An exit status of zero indicates that the device has a driver;
|
|
|
|
non-zero indicates that it does not.
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
The
|
1997-02-11 22:08:22 +00:00
|
|
|
.Fl r
|
2001-07-15 08:06:20 +00:00
|
|
|
option reads a configuration space register at byte offset
|
2002-09-17 18:10:39 +00:00
|
|
|
.Ar addr
|
1997-02-11 22:08:22 +00:00
|
|
|
of device
|
|
|
|
.Ar selector
|
|
|
|
and prints out its value in hexadecimal.
|
2002-09-17 18:10:39 +00:00
|
|
|
The optional second address
|
|
|
|
.Ar addr2
|
2001-05-31 18:31:43 +00:00
|
|
|
specifies a range to read.
|
2001-07-15 08:06:20 +00:00
|
|
|
The
|
|
|
|
.Fl w
|
|
|
|
option writes the
|
1997-02-11 22:08:22 +00:00
|
|
|
.Ar value
|
2001-07-15 08:06:20 +00:00
|
|
|
into a configuration space register at byte offset
|
2002-09-17 18:10:39 +00:00
|
|
|
.Ar addr
|
1997-02-11 22:08:22 +00:00
|
|
|
of device
|
|
|
|
.Ar selector .
|
|
|
|
For both operations, the flags
|
|
|
|
.Fl b
|
|
|
|
and
|
|
|
|
.Fl h
|
|
|
|
select the width of the operation;
|
|
|
|
.Fl b
|
|
|
|
indicates a byte operation, and
|
|
|
|
.Fl h
|
2002-12-14 18:07:13 +00:00
|
|
|
indicates a halfword (two-byte) operation.
|
|
|
|
The default is to read or
|
1997-02-11 22:08:22 +00:00
|
|
|
write a longword (four bytes).
|
2000-12-07 10:52:59 +00:00
|
|
|
.Sh ENVIRONMENT
|
2015-09-06 20:05:29 +00:00
|
|
|
PCI vendor and device information is read from
|
|
|
|
.Pa /usr/local/share/pciids/pci.ids .
|
|
|
|
If that file is not present, it is read from
|
2000-12-07 10:52:59 +00:00
|
|
|
.Pa /usr/share/misc/pci_vendors .
|
|
|
|
This path can be overridden by setting the environment variable
|
|
|
|
.Ev PCICONF_VENDOR_DATABASE .
|
1997-02-11 22:08:22 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ioctl 2 ,
|
|
|
|
.\" .Xr pci 4 ,
|
2007-11-07 12:55:51 +00:00
|
|
|
.Xr devinfo 8 ,
|
2001-07-15 08:06:20 +00:00
|
|
|
.Xr kldload 8
|
1997-02-11 22:08:22 +00:00
|
|
|
.Sh HISTORY
|
2001-07-15 08:06:20 +00:00
|
|
|
The
|
1997-10-06 11:38:30 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility appeared first in
|
1997-02-11 22:08:22 +00:00
|
|
|
.Fx 2.2 .
|
2001-07-15 08:06:20 +00:00
|
|
|
The
|
1997-02-11 22:08:22 +00:00
|
|
|
.Fl a
|
2001-07-15 08:06:20 +00:00
|
|
|
option was added for
|
1997-02-11 22:08:22 +00:00
|
|
|
.Tn PCI
|
1999-04-06 14:04:37 +00:00
|
|
|
KLD support in
|
1997-02-11 22:08:22 +00:00
|
|
|
.Fx 3.0 .
|
|
|
|
.Sh AUTHORS
|
2000-11-22 09:35:58 +00:00
|
|
|
.An -nosplit
|
1997-02-11 22:08:22 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility was written by
|
1997-10-06 11:38:30 +00:00
|
|
|
.An Stefan Esser
|
|
|
|
and
|
|
|
|
.An Garrett Wollman .
|
1997-02-11 22:08:22 +00:00
|
|
|
.Sh BUGS
|
2001-07-15 08:06:20 +00:00
|
|
|
The
|
|
|
|
.Fl b
|
|
|
|
and
|
1997-02-11 22:08:22 +00:00
|
|
|
.Fl h
|
2001-07-15 08:06:20 +00:00
|
|
|
options are implemented in
|
2002-08-13 16:07:28 +00:00
|
|
|
.Nm ,
|
2001-07-15 08:06:20 +00:00
|
|
|
but not in the underlying
|
1999-11-27 16:59:06 +00:00
|
|
|
.Xr ioctl 2 .
|
1997-02-11 22:08:22 +00:00
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
It might be useful to give non-root users access to the
|
1997-02-11 22:08:22 +00:00
|
|
|
.Fl a
|
|
|
|
and
|
|
|
|
.Fl r
|
2000-03-01 14:09:25 +00:00
|
|
|
options.
|
2001-07-15 08:06:20 +00:00
|
|
|
But only root will be able to execute a
|
1999-04-06 14:04:37 +00:00
|
|
|
.Nm kldload
|
|
|
|
to provide the device with a driver KLD, and reading of configuration space
|
2001-07-15 08:06:20 +00:00
|
|
|
registers may cause a failure in badly designed
|
1997-02-11 22:08:22 +00:00
|
|
|
.Tn PCI
|
|
|
|
chips.
|