Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 15-19 May, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 8  
09 Mar 17 07:56
Alok Rathore
xxxxxx@gmail.com
Join Date: 28 Jan 2016
Posts To This List: 8
How to know Request is from OS Installation in Storage driver

During win7 installation, I have to load Storage driver in load driver option, How storage driver which is loaded by me will get to know whether request is from windows installation or OS booted from secondary disk.
  Message 2 of 8  
09 Mar 17 12:22
Alex Grig
xxxxxx@broadcom.com
Join Date: 14 Apr 2008
Posts To This List: 3201
How to know Request is from OS Installation in Storage driver

Why do you need to know that?
  Message 3 of 8  
10 Mar 17 02:04
Alok Rathore
xxxxxx@gmail.com
Join Date: 28 Jan 2016
Posts To This List: 8
How to know Request is from OS Installation in Storage driver

We are observing a different behavior in series of PNP IRPs received by our Storage Port Upper Filter driver during Win 7 installation (load using LoadDriver option) and when used as a secondary disk. Hence we want to track these and accordingly modify our code flow. Is there any registry key or parameters in driver dispatch function, through which we could get a hint about loading environment such as setup, secondary disk, etc., The same behavior is not observed in Win 8.1/10.
  Message 4 of 8  
10 Mar 17 02:12
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10015
How to know Request is from OS Installation in Storage driver

What are the two different sequences of PNP irps? A specific sequence of pn= p irps does not indicate a higher level environment like setup. As long as = the sequences conform to valid state transitions, you should handle them an= d not do anything different based on what you INFER is going on. d -----Original Message----- From: xxxxx@lists.osr.com [mailto:bounce-627229-26293@lists.o= sr.com] On Behalf Of xxxxx@gmail.com Sent: Thursday, March 9, 2017 11:05 PM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: RE:[ntdev] How to know Request is from OS Installation in Storage = driver We are observing a different behavior in series of PNP IRPs received by our= Storage Port Upper Filter driver during Win 7 installation (load using Loa= dDriver option) and when used as a secondary disk. Hence we want to track t= hese and accordingly modify our code flow. Is there any registry key or par= ameters in driver dispatch function, through which we could get a hint abou= t loading environment such as setup, secondary disk, etc., The same behavio= r is not observed in Win 8.1/10.=20 --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=3Dnt= dev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and softwar= e drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.= osronline.com/page.cfm?name=3DListServer>
  Message 5 of 8  
10 Mar 17 02:31
Alok Rathore
xxxxxx@gmail.com
Join Date: 28 Jan 2016
Posts To This List: 8
How to know Request is from OS Installation in Storage driver

The filter driver attaches a device object (Fake PDO) to the Miniport' PDO received in IRP_MN_QUERY_DEVICE_RELATIONS for filter DO, so that we can capture the IRP_MN_QUERY_ID for Miniport PDO. We are able to capture it (and we do some modification in ID reported) and after that we are getting IRP_MN_REMOVE_DEVICE for Fake PDO. After that the stack is enumerated without our Fake PDO. But the same is not observed in Win 7 (secondary), Win 8.1/10. Hence we would like to know the win 7 installation case and handle this special case internally.
  Message 6 of 8  
10 Mar 17 13:36
Alex Grig
xxxxxx@broadcom.com
Join Date: 14 Apr 2008
Posts To This List: 3201
How to know Request is from OS Installation in Storage driver

"The filter driver attaches a device object (Fake PDO) to the Miniport' PDO received in IRP_MN_QUERY_DEVICE_RELATIONS for filter DO, so that we can capture the IRP_MN_QUERY_ID for Miniport PDO. We are able to capture it (and we do some modification in ID reported) and after that we are getting IRP_MN_REMOVE_DEVICE for Fake PDO." That's a bit convoluted solution. Why do you need that? If you want to capture IRPs going to Miniport's PDO, you just need to attach a FilterDO on top of it when you first see it in QUERY_DEVICE_RELATIONS (note that you can see BusRelation requests returning the same PDO multiple times). Fake PDO is a wrong solution.
  Message 7 of 8  
20 Mar 17 06:26
Alok Rathore
xxxxxx@gmail.com
Join Date: 28 Jan 2016
Posts To This List: 8
How to know Request is from OS Installation in Storage driver

Alex, Sorry for the terminology "PDO" used. Actually, we just created a DO and attached to Miniport's PDO and then we could get the QUERY_DEVICE_RELATIONS. Still we could not find out clear way to find out installation scenario.
  Message 8 of 8  
20 Mar 17 09:34
Alex Grig
xxxxxx@broadcom.com
Join Date: 14 Apr 2008
Posts To This List: 3201
How to know Request is from OS Installation in Storage driver

You need to describe exactly what sequence you expect and what sequence you see, and what problem it is causing for you. If you want to tell a future boot disk from non-boot disk by the IRP sequence, I'm afraid you can't do that reliably.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 08:47.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license