While it is possible to specify an alignment to the bus_dma_tag_create function this alignment is ignored in many (if not most cases). For i386 it is only effective if the tag is used to allocate memory via bus_dmamem_alloc() and that memory is larger than PAGE_SIZE. For sparc64 the minimum alignment that may be specified seems to be a IO_PAGE_SIZE. Other architectures probably have equivalent restrictions. Many io devices need buffers that are aligned to 4-byte or other boundaries. In these cases specifying an alignment does NOT help. This should be documented as an implementation limitation, because it can cause driver developers much grief searching for the problem. Fix: Add something like the following to either the paragraph about bus_dma_tag_create or into a BUGS or IMPLEMENTATION NOTES section: The alignment argument to bus_dma_tag_create cannot be used to enforce alignments that are lesser than a PAGE_SIZE. Generally it should be assumed that the argument is ignored by the bus_dma code. How-To-Repeat: look at sys/i386/i386/bus_machdep.c, sys/sparc64/sparc64/{bus_machdep,iommu}.c
Responsible Changed From-To: freebsd-doc->hmp Hmm, interesting. I will take care of this issue after discussing it with Justin.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
The original report is no longer true. alignment argument is not ignored by bus_dma_tag_create and it can be less than PAGE_SIZE