Technical Document #64

Technical Document #64        [Product Version: 8.0.1 and below]
Linux contiguous-buffer DMA allocations — 128KB limitation

Beginning with version 8.0.2 you can use WinDriver to allocate contiguous DMA buffers of more than 128KB on Linux. The following information is relevant for versions 8.01 and below of WinDriver.

By default you can allocate a contiguous DMA kernel buffer of no more than 128KB on Linux. (With regard to the possibility of performing Scatter/Gather DMA on Linux — see Technical Document #47.)

It is possible to recompile the kernel to get larger sizes.
You can look for the bigphysarea patch, which enables DMA allocation of buffers that are larger than 128KB.
You can also download the code for Linux kernels (the relevant file is /usr/src/linux/mm/slab.c ; look for cache_sizes struct) and study the code to understand how to do this, or join Linux-kernel discussion groups on Usenet to get more information on this.
Please note, however, that we have not tested the aforementioned patch and that we will not be able to provide support for any matters related to attempts to increase the maximum DMA buffer allocation size.

If you do recompile the kernel to enable allocation of DMA buffers that are larger than 128KB, you will also need to change the implementation of LINUX_kmalloc() in linux_wrappers.c. The current implementation returns NULL if the requested allocation size is bigger than 128KB. If you use the bigphysarea patch, you will need to call the relevant functions from the patch in LINUX_kmalloc().