From owner-freebsd-hackers Wed Jul 30 11:31:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA22655 for hackers-outgoing; Wed, 30 Jul 1997 11:31:31 -0700 (PDT) Received: from Octopussy.MI.Uni-Koeln.DE (Octopussy.MI.Uni-Koeln.DE [134.95.166.20]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA22649 for ; Wed, 30 Jul 1997 11:31:28 -0700 (PDT) Received: from x14.mi.uni-koeln.de (annexr3-2.slip.Uni-Koeln.DE) by Octopussy.MI.Uni-Koeln.DE with SMTP id AA19367 (5.67b/IDA-1.5 for ); Wed, 30 Jul 1997 20:30:57 +0200 Received: (from se@localhost) by x14.mi.uni-koeln.de (8.8.6/8.6.9) id UAA12308; Wed, 30 Jul 1997 20:30:38 +0200 (CEST) X-Face: " Date: Wed, 30 Jul 1997 20:30:37 +0200 From: Stefan Esser To: Terry Lambert Cc: Michael Smith , mo@uu.net, hackers@FreeBSD.ORG Subject: Re: SMBIOS/DMI etc References: <199707290211.LAA09448@genesis.atrad.adelaide.edu.au> <199707300015.RAA03604@phaeton.artisoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.74 In-Reply-To: <199707300015.RAA03604@phaeton.artisoft.com>; from Terry Lambert on Tue, Jul 29, 1997 at 05:15:14PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Jul 29, Terry Lambert wrote: > > > I have considered adding calls to the PCI BIOS as an > > > alternate mechanism to directly reading configuration > > > space registers. But I have no intention to make the > > > PCI code depend on PCI BIOS services. > > > > This is because...? > > If I had to guess, it's probably because BIOS calls are Intel-centric. Yes, this is one of the reasons. PCI introduced the concept of the configuration space, which requires another distinct address space other than memory and (optionally) I/O port address space to exist. Configuration space can be seen as "bus controller registers" provided as part of each PCI device. In some way the config space registers belong not to the device, but to a "virtual" "bus tree" device. Due to backwards compatibility constraints in PC motherboards, the PCI BIOS has additional knowledge, that is not available from any other source. This includes the traces between the PCI bus interrupt lines and the emulated ICUs in the chip-set, for example. But the PCI BIOS puts information about the Int to IRQ routing for each device that has been located into a config space register of that device, and you don't need to call the PCI BIOS, except if you are interested in where those traces end even though *no* device is directly connected. (Well, the SMP people are interested in exactly that information, in order to deal with some (old) format of the SMP table, but that is a different story :) The PCI BIOS is known to be buggy on lots of older mother-boards. And there still are quite some 486 boards, where calling the 32bit functions may not be a good idea, even though the real mode calls work just fine. (Nobody cared for the 32bit calls at that time, it seems, since they are not used by Win3.11 :) There are quite some broken chip-sets, which violate explicit and boldly printed requirements of the PCI specs, even in the latest machines. If you want to have fun, just run "probepci" on just about any Compaq and watch it go mad ... :) I once complained about this, and some Compaq engineer replied, that their systems worked fine with their BIOS and all O/S code they release, and that it is their decision, whether the system complies at the register level or at the BIOS level with the PCI spec. Well, that's definitely not true, but I don't think there is much I can do about it, except work around their bugs. (And that broke EISA support some time ago, until I added even more work-arounds, since they broke exactly the machanism that is proposed to distinguish a PCI chip-set from some EISA device.) I'm going to add some code to deal with their latest TriFlex to -current soon, since I just got access to a Deskpro 4000 for testing ... One thing that calling the PCI BIOS may be good for is that the device scan order is not defined, and some BIOS does it from low to high, the other from high to low slot numbers. Calling the PCI BIOS from the FreeBSD probe code is the only way to have FreeBSD probe the PCI bus in the same order as the BIOS init code does, and some people with multiple SCSI cards asked for that feature. (But I'd rather want to be able to wire devices to bus slots from the user config menu as an alternative with many more uses :) Regards, STefan