Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 1997 20:02:36 +1000
From:      Mike Smith <mike@smith.net.au>
To:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        mike@smith.net.au (Mike Smith), freebsd-hackers@FreeBSD.ORG
Subject:   Re: PnP support 
Message-ID:  <199709111002.UAA00256@word.smith.net.au>
In-Reply-To: Your message of "Thu, 11 Sep 1997 11:13:45 %2B0200." <199709110913.LAA24117@labinfo.iet.unipi.it> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > [... strategy ...]
> > The point I am making is that if you take this on, the parties 
> > responsible for these fields have already agreed on the course of 
> > action, and will be supporting you all the way.  You won't have to 
> > worry about jurisdiction at all.
> 
> ok. So a few more tech details. The resource management code should
> then keep a private list of used resources, with functions like
> haveseen_isa(), haveseen_pnp(), haveseen_pci() which check if any of
> the requested resource is busy and return a success only if all are
> free. Correspondingly there should be calls to make it possible to
> register/unregister resource usage. Possibly we should also have
> contigmalloc-like functions to return ranges of iospace etc within some
> desired constraint (useful to allocate PnP address ranges etc.).

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 :

 - the ISA startup code says "yup, this machine has an ISA bus", and 
   creates an extent called "isa_io" and another called "isa_mem"
 - the ESCD or ISA startup code would create an extent called "isa_irq"
   and another called "isa_drq" indicating the resources available
   to the ISA bus.

Traversal of these extents would then allow the PnP and vanilla-ISA 
probe/attach code to determine which regions were available for use and 
which had already been allocated.

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.

> Due to recent events :) , but also to the start of classes and to
> the need to keep developing the sound stuff, I don't have enough
> time to also rewrite this resource allocation stuff which is a
> necessary requirement to change the probe/attach sequence as
> discussed in [strategy] above, so is there any volunteer ?

I played a lot with the NetBSD extent allocator a while back.  Jason 
didn't entirely like what I was doing (and TBH some of my ideas were 
pretty warped), but I would be happy to start over and just add the 
important bits (extent names & owners, public extents).  I could 
probably have this ready in a few days.

mike





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