The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
I have posted a part of this question earlier. Just to be in context I will copy some of the information from that.
I am writing a very simple driver where the application will send me a read and/or write buffer (DMA from and to the device). The device needs a circular buffer for issuing request and completing request (NVME style queues). There can be more than one request issues to the device (4K requests). These requests transfer data to / from the user mode application buffers.
The DMA profile that I am going to use is
WdfDmaProfileScatterGather64Duplex : The device supports packet-based, scatter/gather DMA operations, using 64-bit addressing. The device also supports duplex operation.
From what I have read so far, the following is the flow, when I am using the Windows (KMDF) DMA Abstraction.
Add Device : Create the queues using the common buffer DMA APIs. To use Windows DMA abstraction, create a single DMA enabler object.
EvtIoxxx : Create and Initialize the DMA transaction object.
EvtProgramDma : You will get your SGL, format it to the h/w specific format and then program the hardware for the DMA transfer.
Interrupt calls the DPC
DPC completes the request [one transaction is one transfer]
**My problem is that the documentation states that “ If the driver has specified a packet based DMA profile, it must serialize all of the DMA transactions because the framework allows only one packet based DMA transaction to execute at any given time”. **
I do not understand this statement completely. Does it mean that you can only have a single DMA transfer possible at any given time. That is a sever limitation of DMA Abstraction.
My device will have to have multiple IOs pending at any given time (up to 4K IOs).
If I cannot use the DMA Abstraction APIs, How will I create the SGL? The only option that remains is to walk through the MDL myself and then create the hardware specific SGL in a common buffer. [The Book "Developing Drivers With WDF" says that it is not a good idea to walk the MDL by yourself and build SGL]
Any help is really appreciated.
|Upcoming OSR Seminars|
|OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!|
|Internals & Software Drivers||7 February 2022||Live, Online|
|Kernel Debugging||21 March 2022||Live, Online|
|Developing Minifilters||23 May 2022||Live, Online|
|Writing WDF Drivers||12 September 2022||Live, Online|