Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 1997 17:33:58 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        mike@smith.net.au (Mike Smith)
Cc:        luigi@labinfo.iet.unipi.it, mike@smith.net.au, freebsd-hackers@FreeBSD.ORG
Subject:   Re: PnP support
Message-ID:  <199709111733.KAA22407@usr07.primenet.com>
In-Reply-To: <199709111002.UAA00256@word.smith.net.au> from "Mike Smith" at Sep 11, 97 08:02:36 pm

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 :
> 
>  - 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.

Heh.  This is grossly comparable in architecture to the hierarchical
lock manager I want to use to address SMP concurrency issues.  In it,
an extent is a list of nosed from the root to the target, and is
established by establishing an intention mode.


> 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.

I agree, but for a different reason: there is one global space (per
bridged ISA bus, anyway) for the ports, IRQ's, and memory regions
consumed by the devices.  Effectively, there is a hierarchy:

                io+mem+irq
                   \
                     \
                    ISA bus allocations
                       \
                         \
                        PCI bus allocation
                        /  \
                      /      \
       PCMCIA allocation    PnP ISA allocation

Etc..  Resource competition is not just associative, it's commutative
as well.

To be able to handle device arrivals and departures, one has to be
willing to move around existing hardware when a device with one set
of constraints is replaced by a device with a different set of
constraints.

For example, if I have:

	dev1		IRQ 2 or IRQ 5
	dev2		IRQ 2
	dev3		IRQ 5

And my initial configuration is "dev1+dev2" and I change it to
"dev1+dev3", then I need to relocate "dev1" for maximal function.

One could easily imagine this, in fact, with a loaded machine
configuration on a laptop, and replacing a modem with a network
card.  Or unplugging a PCMCIA cellular modem, follwed by docking
the computer with a dock with an ISA network card.  Etc.


> 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.

Way, way cool!


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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