Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 1997 13:33:33 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        gurney_j@resnet.uoregon.edu
Cc:        mike@smith.net.au, freebsd-hackers@FreeBSD.ORG
Subject:   Re: PnP support
Message-ID:  <199709111133.NAA00141@labinfo.iet.unipi.it>
In-Reply-To: <19970911050407.06011@hydrogen.nike.efn.org> from "John-Mark Gurney" at Sep 11, 97 05:03:48 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > This is why I exhorted you to look at the extent manager in NetBSD.  It
> > allows you to define "extents" which are just arbitrary ranges of
> > "something".  I would visualise this being used as follows :

ok, sounds like this is what we need. As a matter of fact it should be
pretty simple code with some list manipulation stuff. Since we
already have list management macros should not be a problem...
unless of course we want to make this code memory-efficient, which
we probably should since these maps take space forever whereas
are used only when new devices are loaded/unloaded.

> > I don't think that making these extents "private" would be at all
> > helpful.  Having them public, and referenced by name, will make it
> > easier to access them.

this is more related to religion :)

I feel much more comfortable with opaque objects since there is
less risk that at some point someone exploits some features on the
internals of the data structures thus effectively freezing them.

As an example (I am sure you can have many yourselves) I did use
a semi-opaque description of dma buffers in the sound code and I
am *very* glad I did that since this has allowed me to change
radically the dma code twice with zero impact on the rest of the
sound code.

As an example of the opposite approach, Voxware exports the structure
of DMA buffers to the application resulting in some restrictions
on the acceptable blocksizes (powers of 2) etc.

I think that if haveseen_isa() had used private resource maps
instead of relying on the availability of global variables we would
not be discussing this now.

	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?199709111133.NAA00141>