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 written many Windows (WDM, mini ports, avstreams, filters) drivers but have been out of windows driver development for about 8 years. Now I am back at it and found that WDF has made life a lot easier .
I have to make a design decision for the queues that the driver will have. So a little background about the hardware that I am writing the function driver for. It is a hardware which is capable of handling many commands at the same time. For discussion sake lets say that 2k IOS can be fired to the controller at a time. At any point in time the driver knows the number of commands that are fired to the controller and if the controller is accepting any new commands or not.
After going through the WDF queues and the options that I have available, I believe that I can really write a driver without any INTERNAL driver queues in it. I can setup a WDF Queue which is power managed and parallel dispatch. When the driver receives a new WDF request and it cannot fire the command to the controller, it will put the command BACK in to the WDF queue which the driver has setup and stop the queues. When the driver detects that the controller can accept new commands, the driver will then start the queues again.
The driver will have to support cancellation by registering EvtWdfRequestCancel function and completion and Cancel will need to make sure that they do not step on each other.
What this basically means is that driver only owns the request that it can fire to the hardware and there is no other request in the driver any time.
Am I missing something here? My only doubt is that if the framework will deliver the commands fast enough to me so that the driver will be able to keep the controller busy.
Any opinions (for or against) are highly appreciated.
Very very happy to be back in this space.
|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!|
|Writing WDF Drivers||24 January 2022||Live, Online|
|Internals & Software Drivers||7 February 2022||Live, Online|
|Kernel Debugging||21 March 2022||Live, Online|
|Developing Minifilters||23 May 2022||Live, Online|