Subject: Re: cardbus patches.
To: Chris G. Demetriou <cgd@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-i386
Date: 05/28/1999 20:29:00
>> If theres' a cleaner way to do (in C++ terms) subclsassing which
>> restricts mappable bus-windows, I'm all ears. So is Hayakawa-san.

>Uh, there's no good way to do this at all in NetBSD right now in a
>machine-independent way, or even specifically on the i386 port.

>The right thing to do is to be able to create a MI bus space tag,
>etc., but you can't do that right now.

Um, no, even that's not it. 

What we need to do is create a _subclassed_ instance of a
bus_space_tag, and pass the (in C++ terms) `constructor' for a
PCI-derived bus_space_tag `subclass' some extra arguments which tell
it what the allowable `memory-space' window is on the sub-bus.

>I've got some ideas on how to fix the bus_space API with regard to
>this, but unfortunately in order to do it what i'd call "The right
>way" they require relatively substantial changes to the mapping
>interfaces...

I think the specific case of CardBus can be handled with one or two
additional `constructor' methods.  Implementations need to keep around
more state, but that's comple hidden from the API, except at the point
where one instatiates the new tag for the `sub-bus' (e..g, 
a new tag for a PC-to-cardbus bridge child.

(does that make sense or is it too abstract?)