Date: Mon, 23 Nov 2015 15:50:42 -0800 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291225 - in head: sys/dev/pci usr.sbin/pciconf Message-ID: <1925707.i8OmFrBir6@ralph.baldwin.cx> In-Reply-To: <201511232348.tANNm7Gp065833@repo.freebsd.org> References: <201511232348.tANNm7Gp065833@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1925707.i8OmFrBir6>