Date: Tue, 12 Aug 1997 00:16:04 +0200 From: Stefan Esser <se@FreeBSD.ORG> To: "John W. DeBoskey" <jwd@unx.sas.com> Cc: freebsd-current@FreeBSD.ORG, Stefan Esser <se@FreeBSD.ORG> Subject: Re: Number of pci busses probed at boot time Message-ID: <19970812001604.36707@mi.uni-koeln.de> In-Reply-To: <199708111850.AA02267@iluvatar.unx.sas.com>; from John W. DeBoskey on Mon, Aug 11, 1997 at 02:50:15PM -0400 References: <199708111850.AA02267@iluvatar.unx.sas.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 11, "John W. DeBoskey" <jwd@unx.sas.com> wrote: > Hi, > > When I boot my system, the pci init code scans 255 pci busses > looking for devices (which are found on bus 0 & 1). So, I thought > I might reduce the number of pci busses probed... Which version of FreeBSD do you use ? > My confusion? Well, in pci.c, we have: > > static int > pci_bushigh(void) > { > if (pic_cfgopen() == 0) > return (-1); > return (0); > } Ahhh, this appears to be -current ... > and the return value is used in: > > int > pci_probe(pciattach *parent) > int bushigh; > int bus = 0; > > bushigh = pci_bushigh(); > while (bus <= bushigh) { > ... > > > So, how is the system finding ANY pci busses? The code above > seems to only return 0 or -1. Could someone enlighten me please? Sure! There are two ways to find the number of PCI buses: 1) Call the PCI BIOS. 2) Just check whether there is PCI to PCI bridge and which bus numbers are behind it. For various reasons I prefer method 2), although there is now BIOS32 support in FreeBSD, which does allow to use 1) as well ... Seems you got the number 255 as that of the highest bus behind some PCI to PCI bridge in a chip-set register, and the probe code obeys this value and scans all buses in between. I have thought about stopping the scan, if no single device was found on some PCI bus, but decided that this was bad, since a PCI extender box with no cards in it would have exactly that effect. Do you by chance have a PPro system with two PCI buses directly attached to the CPU ? If yes, then check out the code in pcisupport.c, functions fixbushigh_orion and fixbushigh_i1225. Can you please check what: # pciconf -r pci0:xx:0 0x48 returns on your system, if you replace xx with the PCI slot number of your host to PCI bridge(s) ? (On an Orion system, there are typically two host to PCI bridge chips.) Regards, STefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970812001604.36707>