Garrett D'Amore wrote: > Steven Stallion wrote: >> Garrett D'Amore wrote: >> >>> I think you mean "seg". >>> >>> It sounds like you need to have an address that is aligned on a 64K >>> boundary, right? seg doesn't quite get you there, since it only ensures >>> that a segment doesn't *cross* a 64K boundary. >>> >>> I think you should set align to the appropriate alignment restriction, >>> i.e. dma_attr_align = 65536. That should do the trick for you. >>> >> Aha! >> >> Question: so does dma_attr_align only affect how a DMA address is >> aligned WRT to virtual memory? > Actually, it makes *no* promises about virtual alignment, only physical > alignment. *HOWEVER*, any alignment of less than a physical page > (either 4K or 8K, I forget which right now -- ETOOMANYARCHITECTURES) is > almost guaranteed to be the same for both physical and kernel virtual > addresses. (I'm not aware of any case where there would be different, > but I don't think anyone has formally made it a promise.) > > Your larger alignment (64K) will apply only physical addresses though.
Also, alignment only applies to ddi_dma_mem_alloc(). The ddi_dma*_bind operations don't look at alignment. MRJ >> I had mistakenly thought this had some >> impact on how data was written by the DMA engine. >> > > No. ddi_dma_attr is used exclusively for DMA resource allocation, and > does nothing to control the actual DMA process. > > -- Garrett > > _______________________________________________ > driver-discuss mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/driver-discuss _______________________________________________ driver-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/driver-discuss
