Subject: Re: bce(4) and memory > 1GB problem
To: Yorick Hardy <yhardy@uj.ac.za>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 01/22/2007 11:13:00
On Mon, Jan 22, 2007 at 08:55:25AM +0200, Yorick Hardy wrote:
> matthew green wrote:
> >   
> >   Thanks for pointing that out.
> >
> >
> >good stuff.  i plan to test and commit this in the next couple of days.
> >i will probably add a __HAVE_BUS_DMATAG_SUBREGION (anyone have a better
> >name??) define to show this function is available to MI code, and
> >change bce(4) to barf if this is not present.
> >
> >
> >thanks!
> >
> >
> >.mrg.
> >
> >  
> I created a patch where all other archs return an error for 
> bus_dmatag_subregion.
> bce then complains if bus_dmatag_subregion returns an error and falls 
> back to the
> parent tag. Is this the right way to go?
> 
> The patch can be applied independent of Manuel's patch for xen.
> 
>  http://mail-index.netbsd.org/tech-kern/2007/01/21/0009.html
> 
> I could not find bus_dma implementations for
>    amiga
>    amigappc
>    cesfic
>    hp300
>    hpc
>    hppa
>    ia64
>    luna68k
>    news68k
>    pc532
>    pdp10
>    sbmips
>    sh3
> 
> is that correct?
> 
> In addition I added the ability to reuse tags on x86 in some circumstances,
> would someone mind having a look over the new bus_dmatag_subregion
> and bus_dmatag_destroy for x86 to see if it looks correct and is worth
> doing? (I am using this patch at the moment.)

One comment: I think max_addr should be 1 << 30, not (1 << 30) - 1 in bce.
It seems the convention is min_addr < addr < max_addr (e.g.
ISA_DMA_BOUNCE_THRESHOLD is 1 << 24).

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
     NetBSD: 26 ans d'experience feront toujours la difference
--