Subject: Re: bus_dma
To: Nitin P Mahajan <Nitin@soc-soft.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-mips
Date: 03/06/2004 17:17:34
On Fri, Mar 05, 2004 at 09:47:28AM +0530, Nitin P Mahajan wrote:
> Hi!
> 
> 	I am writing a code as given bellow to get a data buffer of one
> page size from DMA memory.
> I want the data buffer to be 4 byte aligned hence I am passing the fifth
> argument in the create function as the alignment. But the
> bus_dmamap_load fails returning EFBIG.
> 
> If I pass the alignment argument as 0 in the bus_dmamap_create function
> the call to bus_dmamap_load succeeds.
> 
> Could any one please tell me whre am I making a mistake in this....

the fifth argument ins't alignement but boundary, that is, the chunk of
memory you want should be between 2 adgacent boundaries aligned on this
value.
Really, you can't have a PAGE_SIZE chunk of memory that doesn't cross a 4-byte
boundary.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--