OSRLogoOSRLogoOSRLogo x Seminar Ad

Everything Windows Driver Development

GoToHomePage xLoginx

    Thu, 14 Mar 2019     118020 members


  Online Dump Analyzer
OSR Dev Blog
The NT Insider
The Basics
File Systems
ListServer / Forum
  Express Links
  · The NT Insider Digital Edition - May-June 2016 Now Available!
  · Windows 8.1 Update: VS Express Now Supported
  · HCK Client install on Windows N versions
  · There's a WDFSTRING?
  · When CAN You Call WdfIoQueueP...ously

Fast I/O for WDM Drivers NOT Called When Verifier's Enabled

[This issue was brought to our attention by Steve Whitman at Cognex and passed along to me by OSR's PeterGV.]

Suppose you have a WDM driver for a special-purpose piece of equipment. Let's further suppose that you can always complete requests on this device synchronously.

One thing that's never really been documented, but that you have always been able to do, is use Fast I/O for Device I/O Control to process these requests. The requirement for this is that your driver is "at the top" of the stack -- that yours is the first driver entered from the I/O Manager.

It seems that on XP when Driver Verifier is enabled, your Fast I/O entry point for Device I/O Control never gets called. However, it doesn't seem that the I/O Manager has actually changed its behavior in this regard in XP, because when Driver Verifier is not enabled, your Fast I/O entry point is ALWAYS called. So what's up?

It's Driver Verifier, up to his old tricks again. During PnP processing, Verifier inserts filters above and below a driver's FDO. Because Fast I/O entry points are only called in drivers that are the first driver entered from the I/O Manager, having a filter above your device results in your driver's Fast I/O entry point never being called. So, this means that if your WDM driver assumes it will be called at its Fast I/O entry point for Device I/O Control must also provide for handling of Device I/O Control IRPs via normal dispatch entry points (or else not work under Verifier). Fortunately, you can do this pretty easily by writing a short DispatchDeviceControl routine that merely calls the Fast I/O Dispatch routine with the correct parameters, and then calls IoCompeteRequest( ).

NOTE:  File systems do not appear to be affected... their Fast I/O entry points are called as usual.

Related Articles
Life in the Fast I/O Lane

User Comments
Rate this article and give us feedback. Do you find anything missing? Share your opinion with the community!
Post Your Comment

Post Your Comments.
Print this article.
Email this article.
bottom nav links