OSRLogo
OSRLogoOSRLogoOSRLogo x Subscribe to The NT Insider
OSRLogo
x

Everything Windows Driver Development

x
x
x
GoToHomePage xLoginx
 
 

    Wed, 19 Jun 2013     98942 members

   Login
   Join


 
 
Contents
  About This Site
What's New?
OSR Dev Blog
The NT Insider
The Basics
File Systems
Downloads
ListServer / Forum
Driver Jobs
Store
  Express Links
  · OSR Seminar Schedule
  · WdfSend: Are There REALLY Three Useful Variants?
  · Turning a Breakpoint into a Busypoint
  · Investigating a NULL Pointer Dereference
  · Understanding WDFMEMORY Objects

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.

Kernel Debugging & Crash Analysis
LAB

Santa Clara, CA
9-13 Sep 2013

Windows Internals and SW Drivers
LAB

Santa Clara, CA
16-20 Sep 2013

Writing WDF Drivers
LAB

Boston/Waltham, MA
7-11 Oct 2013

Developing File Systems
Seattle, WA
5-8 Nov 2013

 
 

Windows Debugger

Checked Build Downloads
29-Apr-10

Debugging Symbols

WDK Documentation

Windows WDK

 
 
x
LetUsHelp
 

Need to develop a Windows file system solution?

We've got a kit for that.

Need Windows internals or kernel driver expertise?

Bring us your most challenging project - we can help!

System hangs/crashes?

We've got a special diagnostic team that's standing by.

Visit the OSR Corporate Web site for more information about how OSR can help!

 
bottom nav links