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 12:13:02
On Mon, Jan 22, 2007 at 01:09:33PM +0200, Yorick Hardy wrote:
> Manuel Bouyer wrote:
> >[...]
> >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).
> >
> >
> I am a bit confused. It could be, but after reading Jachym's
> comment
>
> http://mail-index.netbsd.org/tech-kern/2007/01/17/0006.html
>
> and reading the manual page uvm(9)
>
> uvm_pglistalloc() allocates a list of pages for size size byte under var-
> ious constraints. low and high describe the lowest and highest addresses
> acceptable for the list.
>
> it seemed that the high address was included.
I suspect that, as off this is a multiple of PAGE_SIZE, 0x40000000 and
0x3fffffff gives the same result anyway, for uvm_pglistalloc().
If it's not ISA_DMA_BOUNCE_THRESHOLD would have been wrong for years ...
Now, the x86 _bus_dmamem_alloc() calls trunc_page() on _bounce_alloc_hi,
so 0x3fffffff will become 0x3ffff000, and this is not the same thing.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--