]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 291225:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 18 Jan 2016 19:52:20 +0000 (19:52 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 18 Jan 2016 19:52:20 +0000 (19:52 +0000)
commitf4a211ffe6bae57f6aa63b66d3302a05aa8803a5
tree84bbf574c0ed296051e3958470e23c6ef0f59816
parentb285572892e648da71049b19b2f83ae329afd5c2
MFC 291225:
Add a new -B flag for use with list mode (-l) that lists details about
bridges.  Currently this includes information about what resources a
bridge decodes on the upstream side for use by downstream devices including
bus numbers, I/O port resources, and memory resources.  Windows and bus
ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges.

To simplify the implementation, all enumeration is done by reading the
appropriate config space registers directly rather than querying the
bridge driver in the kernel via new ioctls.  This does result in a few
limitations.

First, an unimplemented window in a PCI-PCI bridge cannot be accurately
detected as accurate detection requires writing to the window base
register.  That is not safe for pciconf(8).  Instead, this assumes that
any window where both the base and limit read as all zeroes is
unimplemented.

Second, the PCI-PCI bridge driver in a tree has a few quirks for
PCI-PCI bridges that use subtractive decoding but do not indicate that
via the progif config register.  The list of quirks is duplicated in
pciconf's source.

git-svn-id: svn://svn.freebsd.org/base/stable/10@294289 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/pci/pcireg.h
sys/dev/pci/pcivar.h
usr.sbin/pciconf/pciconf.8
usr.sbin/pciconf/pciconf.c