History log of /freebsd-10.0-release/usr.sbin/pciconf/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


253455 18-Jul-2013 jkim

Decode PCIe ASPM capability and status.


250741 17-May-2013 kib

Decode new HT 3.00 and 3.10 capabilities.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week


246632 10-Feb-2013 neel

Use the entire 64 bits of 'bar.pbi_length' when printing the bar size.

This allows bar sizes greater than or equal to 4GB to be displayed correctly.


246367 05-Feb-2013 jhb

Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers
in /usr/include.

MFC after: 2 weeks


246221 01-Feb-2013 neel

Display MSI-X table and PBA offsets when displaying information about MSI-X
capability.

Reviewed by: jhb, jimharris (initial version)


242085 25-Oct-2012 jimharris

For PCI Express capability, if max link width is greater than zero, print
the current and max link speed.

Sponsored by: Intel
Discussed with: jhb
MFC after: 1 week


241757 19-Oct-2012 imp

Indent ecaps the same way we indent caps.

MFC after: 3 days


240739 20-Sep-2012 gavin

The correct generic term for PCIS_STORAGE_NVM is "NVM" not "NVM Express".

Submitted by: jimharris
MFC after: 6 days


240699 19-Sep-2012 gavin

Recognise NVM Express devices and pretty-print their name.

MFC after: 1 week


240680 18-Sep-2012 gavin

Align the PCI Express #defines with the style used for the PCI-X
#defines. This also has the advantage that it makes the names more
compact, iand also allows us to correct the non-uniform naming of
the PCIM_LINK_* defines, making them all consistent amongst themselves.

This is a mostly mechanical rename:
s/PCIR_EXPRESS_/PCIER_/g
s/PCIM_EXP_/PCIEM_/g
s/PCIM_LINK_/PCIEM_LINK_/g

When this is MFC'd, #defines will be added for the old names to assist
out-of-tree drivers.

Discussed with: jhb
MFC after: 1 week


240474 13-Sep-2012 jhb

- Denote PCI-e endpoints that support FLR.
- Make parsing of PCI-e extended capabilities assume that future version
numbers are backwards compatible.
- Add new AER error descriptions.
- Add descriptions for more PCI-e extended capabilities.

MFC after: 1 week


240146 05-Sep-2012 gavin

- If the PCIe "SLOT" flag is set, include this in the capability output
- Fix printing of PCIe interrupt number, the shift was incorrect.

MFC after: 1 week


236415 01-Jun-2012 jhb

Add a new -e flag to pciconf(8)'s list mode to display PCI error details.
Currently this dumps the status of any error bits in the PCI status register
and PCI-express device status register. It also lists any errors indicated
by version 1 of PCI-express Advanced Error Reporting (AER).

MFC after: 1 week


233648 29-Mar-2012 eadler

Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days


228990 30-Dec-2011 uqs

Spelling fixes for usr.sbin/


212749 16-Sep-2010 jhb

Only attempt to list extended capabilities for devices that have a
PCI-express capabilities. Non-PCI-express PCI devices may simply ignore
the upper bits in a config register address effectively aliasing the
device ID register to 0x100 rather than returning 0xFFFFFFFF. Previously
the code relied on these reads returning 0xFFFFFFFF.

MFC after: 3 days


212372 09-Sep-2010 jhb

Document the format of extended capabilities in the '-c' output.


212369 09-Sep-2010 jhb

- Use 'sta' to hold the PCIR_STATUS register value instead of 'cmd' when
walking the capability list.
- Use constants for PCI header types instead of magic numbers.

MFC after: 1 week


212329 08-Sep-2010 jhb

Simplify chkattached(). The PCIOCATTACHED ioctl only needs the pi_sel
field populated, it ignores the rest of the 'pci_sel' structure.

MFC after: 1 week


212326 08-Sep-2010 jhb

- Add register definitions related to extended capability IDs in
PCI-express. I used PCIZ_* for ID constants (plain capability IDs use
PCIY_*).
- Add register definitions for the Advanced Error Reporting, Virtual
Channels, and Device Serial Number extended capabilities.
- Teach pciconf -c to list extended as well as plain capabilities. Adds
more detailed parsing for AER, VC, and device serial numbers.

MFC after: 2 weeks


211397 16-Aug-2010 joel

Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages. Minor corrections by me.

Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>


201390 02-Jan-2010 ed

The last big commit: let usr.sbin/ use WARNS=6 by default.


191222 17-Apr-2009 jhb

- Add a few more register defintions for the PCI express capability
registers.
- Cleanup PCI-X capability printf to not leave a dangling "supports" for
some PCI-X bridges.
- Display additional PCI express details including the negotiated and max
link width and the actual and maximum supported max payload.

MFC after: 1 month


188641 15-Feb-2009 mav

Tune output to remove trailing space.

Submitted by: Christoph Mallon


188640 15-Feb-2009 mav

Add SATA and PCI Advanced Features capabilities reporting.


188018 02-Feb-2009 jhb

- Add a new ioctl to /dev/pci to fetch details on an individual BAR of a
device. The details include the current value of the BAR (including all
the flag bits and the current base address), its length, and whether or not
it is enabled. Since this operation is not invasive, non-root users are
allowed to use it (unlike manual config register access which requires
root). The intention is that userland apps (such as Xorg) will use this
interface rather than dangerously frobbing the BARs from userland to
obtain this information.
- Add a new sub-mode to the 'list' mode of pciconf. The -b flag when used
with -l will now list all the active BARs for each device.

MFC after: 1 month


184936 13-Nov-2008 mav

Add ADMA, SATA and SAS mass storage subclasses.


184142 21-Oct-2008 mav

Add HDA multimedia subclass.


184140 21-Oct-2008 mav

Add "SD host controller" subclass name.


182708 03-Sep-2008 imp

style nit: indent continuation lines correctly, use style(9) style
if() statement.


182707 03-Sep-2008 imp

minor style(9) police: sort getopt options alphabetically. The
semi-logical segregation of 'b' and 'h' doesn't seem to make sense and
makes it harder to read.


173576 13-Nov-2007 jb

Include agpreg.h from it's new location.


173415 07-Nov-2007 marck

devinfo(8) manual page refers to pciconfr(8). Add back reference for
completeness.

MFC After: 2 weeks


173228 31-Oct-2007 jhb

Update copyright attribution.

MFC after: 3 days


173059 27-Oct-2007 jhb

Missed in the previous commit to this file:
Actually support the new HT capability type from HT 2.00b.

MFC after: 3 days


172448 04-Oct-2007 se

Make selector parsing accept the dot "." as an alternative selector
with identical meaning as the colon ":". This is to support a syntax
that is more similar to a PCI device specification in the device hints
file. The selector is not fully compatible with the specification in
the hints file, since entries in that file use a different prefix,
which needs to be added to the getsel() routine, if full support of
that syntax is found to be desirable.

Approved by: re (Ken Smith)


172447 04-Oct-2007 se

Restore compatibility with version before introduction of PCI domains.
PCI selectors with 2 or 3 elements behave exactly as before (i.e. the
domain is 0 and in the 2 element case, the function is also 0).
The form with 4 selector elements works as in the previous revision
and provides the PCI domain number as the left-most selector element.

This change allows old scripts (which used the 2 or 3 selector element
formats) to be kept. Without this patch, the 3 element form was parsed
as starting with a domain number (and the function was assumed to be 0),
with this patch, the domain is assumed to be 0 (and the last value is
used as the function number).

The man page is updated to describe the new selector semantics.

Approved by: re (Ken Smith)


172394 30-Sep-2007 marius

Make the PCI code aware of PCI domains (aka PCI segments) so we can
support machines having multiple independently numbered PCI domains
and don't support reenumeration without ambiguity amongst the
devices as seen by the OS and represented by PCI location strings.
This includes introducing a function pci_find_dbsf(9) which works
like pci_find_bsf(9) but additionally takes a domain number argument
and limiting pci_find_bsf(9) to only search devices in domain 0 (the
only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are
changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order
to no longer report false positives when searching for siblings and
dupe devices in the same domain respectively.
Along with this change the sole host-PCI bridge driver converted to
actually make use of PCI domain support is uninorth(4), the others
continue to use domain 0 only for now and need to be converted as
appropriate later on.
Note that this means that the format of the location strings as used
by pciconf(8) has been changed and that consumers of <sys/pciio.h>
potentially need to be recompiled.

Suggested by: jhb
Reviewed by: grehan, jhb, marcel
Approved by: re (kensmith), jhb (PCI maintainer hat)


169037 25-Apr-2007 jhb

- HT 2.00b added a new flag to the MSI mapping HT capability to indicate
that the MSI mapping window is fixed at 0xfee00000 and the capability
does not include two more dwords used to program the address. Supporting
this mostly results in quieting spurious warnings during boot about
non-default MSI mapping windows.
- HT 2.00b also added a new HT capability type, so support that in pciconf.

MFC after: 3 days
Tested by: jmg


166528 06-Feb-2007 ru

- Bump document date.
- Kill whitespace at EOL.
- Add missing markup bit.


166435 02-Feb-2007 jhb

- 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


149225 18-Aug-2005 des

Use larger buffers to read lines from the vendor list.
Trim trailing whitespace and comments before parsing, and skip empty lines.
Skip subvendor / subdevice entries (which start with two tab characters).
Change the scanf() format string to match any amount and type of whitespace
between the device ID and the description text.

MFC after: 3 weeks


149223 18-Aug-2005 des

Whitespace cleanup.


144156 26-Mar-2005 jmg

add some additional pci classes and sub-classes..

Reviewed by: imp (almost 6 months ago)


133271 07-Aug-2004 imp

Revert unintended commit that came in with 3rd clause removal


133268 07-Aug-2004 le

Fix syntax error introduced in the last commit.

Additionally, since this file is written in C and not in Perl,
we need 'continue' instead of 'next'.


133249 07-Aug-2004 imp

Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived software
(with permission of addtional copyright holders where appropriate)


124192 06-Jan-2004 rwatson

Update pciconf man page to indicate that only some of the functions
in pciconf are limited to the superuser.

Requested by: ru


124031 31-Dec-2003 rwatson

Only a read-only file descriptor is required to implement list_devs()
and list_verbose(), so don't open /dev/pci read-write. This allows
pciconf -l[v] to work for non-root users, assuming the securelevel is
0 or -1.

Problem experienced by: William Michael Grim <wgrim@siue.edu>


116640 20-Jun-2003 jmg

make pciconf understand it's own output as stated in the manpage.

pciconf -r none8@pci1:12:2: 0x0
now works.

PR: bin/10312
Submitted by: Castor Fu


115223 22-May-2003 ru

Moved $FreeBSD$ tag to where it belongs.

Approved by: re (blanket)


108987 09-Jan-2003 trhodes

Fix up some grammar.

Noticed by: sheldonh


107871 14-Dec-2002 trhodes

Markup fixes. Document more correctly.

PR: 43678
Submitted by: ru


103499 17-Sep-2002 jdp

Use consistent terminology in the usage message, the man page
synopsis, and the man page description ("selector" vs. "sel" and
"addr" vs. "reg").

Fix the usage message and man page synopsis to show that the "value"
argument is not optional.


101828 13-Aug-2002 ru

mdoc(7) police: Removed redundant .Ns calls.


99968 14-Jul-2002 charnier

The .Nm utility


97562 30-May-2002 ru

mdoc(7) police: make SYNOPSIS really match usage().


96678 15-May-2002 trhodes

pciconf(8) has an incorrect synopsis which argues the output from the
actual program.


91299 26-Feb-2002 sos

When asked to print bytes (-b option) do that and put 16 on a line.


86966 27-Nov-2001 sheldonh

Add missing -v option to the SYNOPSIS.


81588 13-Aug-2001 ru

Spell "FreeBSD" with "F" and "BSD" in uppercase.


80029 20-Jul-2001 obrien

Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


79537 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


77533 31-May-2001 imp

Support a range of registers to read.
eg pciconf -r pci0:10:0 0:0xff
and keep the output of the old singleton the same.

Reviewed by: audit@, dd

MFC after: 10 days


77513 31-May-2001 imp

Minor style(9) tweak: if ( instead of if(.


74816 26-Mar-2001 ru

- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.


74532 20-Mar-2001 ru

Set the default manual section for usr.sbin/ to 8.


69785 09-Dec-2000 msmith

Update for new location of pcireg.h.


69700 07-Dec-2000 msmith

Update to improve handling of verbose PCI vendor/device information.

- Read the database from /usr/share/misc (or wherever else we're pointed)
rather than compiling it in.
- Decode the class/subclass fields if requested.
- Print things in a slightly longer but more readable format.


69027 22-Nov-2000 ru

mdoc(7) police: do not split author names in the AUTHORS section.


68965 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68677 13-Nov-2000 msmith

Add support for decoding the PCI vendor and device ID registers. Add a
database of about 1400 vendors and 2700 devices courtesy of
www.yourvote.com/pci. We still need to add some more, but this is a good
start.


57673 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


54322 08-Dec-1999 ken

[ repository copy of sys/pci/pci_ioctl.h to sys/sys/pciio.h happened in the
background ]

Rename sys/pci/pci_ioctl.h to sys/sys/pciio.h to make it easier for
userland programs to use this interface. Reformat the file, and add a
BSD-style copyright to it.

Add a new man page for pci(4). The PCIOCGETCONF, PCIOCREAD, and PCIOCWRITE
ioctls are documented, but the PCIOCATTACHED ioctl is not documented
because it is not implemented.

Change includes of <pci/pci_ioctl.h> to <sys/pciio.h> or remove them
altogether. In many cases, pci_ioctl.h was unused.

Reviewed by: steve


53761 27-Nov-1999 charnier

.Fn -> .Xr
Do not start warn() message with uppercase.


50479 28-Aug-1999 peter

$Id$ -> $FreeBSD$


50225 23-Aug-1999 peter

Fix a few problems on the Alpha, and fix -Wall while here.
Before:
isab0@pci0:8:0: class=0x060100 card=0x00000000 chip=0xffffffffc6931080 ...
After:
isab0@pci0:8:0: class=0x060100 card=0x00000000 chip=0xc6931080 ...


45383 06-Apr-1999 ghelmer

Replace LKM with KLD.

Submitted by: Nathan Ahlstrom <nrahlstr@winternet.com>


41103 12-Nov-1998 ken

Modify pciconf(8) so that it will print out PCI devices that have no driver
configured in the kernel. It gives them a device name of "none" and
monotonically incrementing unit numbers. (starting at 0) Before, pciconf
would just skip over unconfigured devices. (unconfigured devices can be
detected because they have a null string for a device name)

Update the man page to reflect the new pciconf output. Unfortunately, this
causes the sample 'pciconf -l' output lines to wrap, but I'm not sure what
to do about that really.

If anyone presents a reasonable case for printing out something other than
"none1" for unconfigured devices, I'm willing to listen.


39231 15-Sep-1998 gibbs

Revive PCIConf.

Submitted by: "Kenneth D. Merry" <ken@plutotech.com>


30172 06-Oct-1997 charnier

Sync usage string with man page.


27401 14-Jul-1997 wpaul

Unbreak this file some more:

CFLAGS=+-I${.CURDIR}/../../sys -> CFLAGS+= -I${.CURDIR}/../../sys

Asked about on BSDnet:#FreeBSD by: philw@dream.webmaster.com (Phillip White)


27398 14-Jul-1997 guido

Unbreak it. Apparently I forgot to do a make clean when testing :-(
Unfortunately, Makefile is not included in .depend.


27362 13-Jul-1997 guido

Remove -I/sys


24428 31-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


22821 17-Feb-1997 bde

Oops, get the name of the new manpage right.


22577 12-Feb-1997 bde

Actually install the new manpage.


22574 11-Feb-1997 se

Man page for the pciconf utility. There really should be some
documentation on the ioctl() interface provided by /dev/pci ...

Reviewed by: wollman


21935 21-Jan-1997 se

Add PCI LKM support:New -a option checks whether a driver has been assigned to a device.


19817 16-Nov-1996 se

Fix core dump after printing usage message (pointed out by BDE).
Add printing of PCI header type register. (This makes the output
80 columns wide. Ughh. I'm looking for a better way to put the
information on one line ...)


19103 22-Oct-1996 se

This commit was generated by cvs2svn to compensate for changes in r19102,
which included commits to RCS files with non-trunk default branches.