From owner-svn-src-all@freebsd.org Mon Nov 23 23:51:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC19DA369C0; Mon, 23 Nov 2015 23:51:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B31181D34; Mon, 23 Nov 2015 23:51:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AFE98B915; Mon, 23 Nov 2015 18:51:01 -0500 (EST) From: John Baldwin 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 Date: Mon, 23 Nov 2015 15:50:42 -0800 Message-ID: <1925707.i8OmFrBir6@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201511232348.tANNm7Gp065833@repo.freebsd.org> References: <201511232348.tANNm7Gp065833@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 23 Nov 2015 18:51:01 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 23:51:03 -0000 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