Hi All,
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.
So this is a packet based DMA driver.
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”.
Basically what it means is that I can only have a single DMA (single DMA enabler object) going on at any given time. For my device, I need to be able to fire 4K IOS at any given time and the hardware will complete (out of order) them whenever it has the data ready.
For a device of my type, I would not be able to use the Windows DMA abstraction as such.
Is my understanding correct about this?
Please let me know.
Thanks
AJ-