Subject: Re: Rev 1.19 of busdma.doc
To: None <>
From: Chris G Demetriou <>
List: tech-kern
Date: 11/09/1996 21:45:43
> >...
> >caddr_t	bus_dmamem_alloc __P((bus_dma_tag_t tag, size_t size,
> >	    int nsegments, bus_size_t alignment, struct proc *p,
> >	    int flags));
> >....
> In a system with multiple busses alignment can change
> as you move from one nexus to the other, so the initial
> alignment (which is probably what is required by the leaf
> node's dma engine). This fine insofar as it goes, but if
> the leaf node then further subdivides that allocated
> memory, it has to know that the alignment it requested
> may be less restrictive than that which is now necessary.
> How about making the alignment argument a pointer so
> that the leaf node can know what is actually required?
> Presumably the return value is in units that can get
> plugged into a DMA engine, right? If so, then you'd
> better make this a quad_t (to allow for physical addresses
> for large systems to get passed).


The return value is a mapped KVA which is at least the specified
'size' number of bytes in length.

It can be mapped by (whatever the mapping function is called today)
with the properties requested by the arguments.