svn commit: r291225 - in head: sys/dev/pci usr.sbin/pciconf
John Baldwin
jhb at freebsd.org
Mon Nov 23 23:51:03 UTC 2015
On Monday, November 23, 2015 11:48:07 PM John Baldwin wrote:
> Author: jhb
> Date: Mon Nov 23 23:48:07 2015
> New Revision: 291225
> URL: https://svnweb.freebsd.org/changeset/base/291225
>
> Log:
> 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.
Some sample output:
pcib6 at pci0:0:30:0: class=0x060401 card=0x20f417aa chip=0x24488086 rev=0x93 hdr=0x01
bus range = 21-24
window[1c] = type I/O Port, range 16, addr 0x5000-0x8fff, enabled
window[20] = type Memory, range 32, addr 0xf4300000-0xf7ffffff, enabled
window[24] = type Prefetchable Memory, range 64, addr 0xf0000000-0xf3ffffff, enabled
decode = ISA, subtractive
...
cbb0 at pci0:21:0:0: class=0x060700 card=0x20c617aa chip=0x04761180 rev=0xba hdr=0x02
bus range = 22-24
window[1c] = type Memory, range 32, addr 0xfff00000-0xfffff, disabled
window[24] = type Memory, range 32, addr 0xfff00000-0xfffff, disabled
window[2c] = type I/O Port, range 16, addr 0x5000-0x50fc, enabled
window[34] = type I/O Port, range 16, addr 0xfffc-0, disabled
--
John Baldwin
More information about the svn-src-all
mailing list