Hi all.
I’m working on a driver that uses DMA with the common buffer approach (it’s
actually a number of common buffers).
The technique is more or less the one described in this blog entry
http://blogs.msdn.com/peterwie/archive/2006/03/09/546961.aspx
(section “Using Common Buffer to setup a continuous transfer”).
I’ve done it in the past in a couple WDM drivers (following the Oney’s). The
key point there was that I didn’t need to call MapTransfer and stuff because
I had the virtual address and physical address of the common buffer (the
devices were DMA bus-master capable).
With KMDF there’s something that worries me. The WDF book (page 568, chapter
17, “Example: Driver DMA initialization”) says “The driver now creates a
common buffer. It does this by calling WdfCommonBufferCreate, passing the
length in bytes of the required common buffer. The allocated common buffer
area is not necessary physically contiguous.”
Maybe I’m stupid, but I see a contradiction in this…
Thanks again
GV