Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 1997 06:04:33 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        hasty@rah.star-gate.com (Amancio Hasty)
Cc:        hackers@freebsd.org, multimedia@freebsd.org
Subject:   Advice sought on PnP configuration
Message-ID:  <199707300404.GAA03229@labinfo.iet.unipi.it>
In-Reply-To: <199707300216.TAA03025@rah.star-gate.com> from "Amancio Hasty" at Jul 29, 97 07:16:06 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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/
_____________________________|______________________________________



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707300404.GAA03229>