Re: WDF DMA use



Yes it will coalesce it using map registers.

For scatter-gather DMA, map registers will be used only if the buffer lies outside the range of memory your hardware can access.

Yes, map registers are very precious resource. You can think of them as backup buffers allocated by the system to workaround hardware addressing limitations. The system can only allocate so many of those. The number of concurrent DMA transactions is constrained by the number of map registers system can provide. You can ask for large amount of map registers by specifying a big value in MaximumLength field, but the system may not provide everything you ask for. Based on what the system provides, you have to scale down your concurrency level. Take a look at the PCIDRV sample and the logic around WdfDmaEnablerCreate call.

Since you are using Packet based DMA, one think you should note is that you cannot initiate more than one DMA transactions concurrently. This is a limitation imposed by the DMA sub-system because of the way it waits for the map-registers to be made available. Framework has logic to enforce this limitation.

-Eliyas

.



Relevant Pages

  • Re: AllocateCommonBuffer and map registers
    ... I have a question regarding DMA and map registers. ... I am specifying a multi-megabyte .MaximumLength struct member so ... I can tell whether I can get a large number of map registers. ... If you're using a common buffer, why would you call GetScatterGatherList at ...
    (microsoft.public.development.device.drivers)
  • AllocateCommonBuffer and map registers
    ... I have a question regarding DMA and map registers. ... driver for a Xilinx FPGA which does support Bus Mastering of the PCI Express ... a common buffer larger than about 60 MBytes then AllocateCommonBuffer() ...
    (microsoft.public.development.device.drivers)
  • Re: WDF DMA use
    ... If you are planning to use common buffer and do the memory copy yourself then you should use AllocateCommonBuffer to allocate memory. ... By using DMA interfaces, you make your driver future proof. ... Is there another way to cause the system not to use map registers? ...
    (microsoft.public.development.device.drivers)
  • Re: WDF DMA use
    ... I would like to design a driver that will use DMA abstraction, ... common buffer to allocate memory and copying fragments to a contiguous ... AllocateCommonBuffer to allocate memory. ... Is there another way to cause the system not to use map registers? ...
    (microsoft.public.development.device.drivers)

Loading