Subject: Re: cardbus patches.
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Chris G. Demetriou <cgd@netbsd.org>
List: port-i386
Date: 05/28/1999 20:39:54
Jonathan Stone <jonathan@DSG.Stanford.EDU> writes:
> 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.

if you think about e.g. the way the alpha does (or an MI
implementation should do) bus space tags, i don't think that's too far
from the mark.


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

Right, e.g. replace the normal map/unmap/alloc/free methods with ones
that do the extra stuff and bookkeeping you need...

I'd do that by taking an existing bus space tag, copying most of its
functions, and replacing the few that need to be changed.



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.