Subject: Re: bce(4) and memory > 1GB problem
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Yorick Hardy <yhardy@uj.ac.za>
List: tech-kern
Date: 01/22/2007 13:09:33
Manuel Bouyer wrote:
> 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).
>
>   
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.

-- 
Kind regards,

Yorick Hardy