From owner-freebsd-multimedia Tue Jul 29 22:04:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA08389 for multimedia-outgoing; Tue, 29 Jul 1997 22:04:02 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id WAA08374; Tue, 29 Jul 1997 22:03:58 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id GAA03229; Wed, 30 Jul 1997 06:04:33 +0200 From: Luigi Rizzo Message-Id: <199707300404.GAA03229@labinfo.iet.unipi.it> Subject: Advice sought on PnP configuration To: hasty@rah.star-gate.com (Amancio Hasty) Date: Wed, 30 Jul 1997 06:04:33 +0200 (MET DST) Cc: hackers@freebsd.org, multimedia@freebsd.org In-Reply-To: <199707300216.TAA03025@rah.star-gate.com> from "Amancio Hasty" at Jul 29, 97 07:16:06 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Hopefully, with the on-going work in the multimedia group we will > make the use of PnP devices a very painless experience. I am revising the PnP configuration stuff. I have got to a point where it behaves very similarly to the PCI configuration stuff, i.e. it relies on the BIOS to set addresses and IRQs correctly, and then fetches the parameters from the board and passes them to the driver. No manual configuration required (of course, the OS must recognize your card, but that's another problem and is common with PCI stuff -- within some time, a reasonable database of card IDs can be compiled to have things working for a wide range of boards). HOWEVER: this relies on the PnP (or PCI for what matters) BIOS to work correctly (which might be false, see at the end of the message). In order to configure cards correctly, the bios should know which IRQs and which I/O address ranges are used by plain isa devices. The former can be told to some bioses, the latter I have never seen how to do on my systems. This is not a big deal with PCI devices since they usually map addresses in the high range of iospace, but a serious problem with PnP ISA devices where iospace is tight and shared with non PnP devices. Since we cannot trust the BIOS (because it does not have enough info) the only way to do autoconfiguration reliably in FreeBSD is the following: 1 probe & attach pci devices 2 disable all pnp devices, so that they are not recognized by isa probes; 3 probe & attach plain isa devices; 4 configure PnP devices, using info derived from the isa configuration process to determine which address ranges and irqs are busy; 5 activate PnP devices; 6 finally, probe and attach PnP devices. Any comments on the above ? Right now I am doing steps in the order 1, 5, 6, 3 (2 and 4 are not necessary if the bios works), but it can fail in some cases for the reasons stated above. Cheers Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________