building a stack on ROOT

can we make a stack of drivers on ROOT bus? Like a WDM driver complete with
upper and lower filters?

If so, how do I defie the upper and lower filters for the device? and how do
I attach to the main driver?

One word answer: Toaster.

If you don’t know it is in the WDK you need to take a class in driver writing. Also Walter Oney’s book on WDM drivers, second edition.

“A P” wrote in message news:xxxxx@ntdev…
can we make a stack of drivers on ROOT bus? Like a WDM driver complete with upper and lower filters?

If so, how do I defie the upper and lower filters for the device? and how do I attach to the main driver?

Yes, even a kmdf driver works here :). Also note that for root enumerated stacks lower filters make no sense because io does not flow from the fdo to the pdo

d

Sent from my phone with no t9, all spilling mistakes are not intentional.


From: A P
Sent: Thursday, August 06, 2009 9:27 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] building a stack on ROOT

can we make a stack of drivers on ROOT bus? Like a WDM driver complete with upper and lower filters?

If so, how do I defie the upper and lower filters for the device? and how do I attach to the main driver?
— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Also note that for root enumerated stacks lower filters make no sense
because io does not flow from the fdo to the pdo



Huh?

Why not? If the FDO throws an I/O request down the stack, why would it not
hit lower filters? Are not lower filters between the FDO and PDO? The
worst thing that happens it he PDO just completes it with an error, right?

How could ROOT enumeration be any different than any other PDO enumeration?

I must be missing something and exposing myself as a huge dope so please,
explain.

Thanks,

Dave Cattley

A root enumerated device has no lower layer protocol to talk to. What io is the FDO going to send to the generic root PDO? the PDO does not understand read/write/IOCTLs etc. A root enumerated FDO processes IO at its level and either sends it to some other stack or completes the IO itself

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, August 06, 2009 10:27 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] building a stack on ROOT


Also note that for root enumerated stacks lower filters make no sense because io does not flow from the fdo to the pdo


Huh?

Why not? If the FDO throws an I/O request down the stack, why would it not hit lower filters? Are not lower filters between the FDO and PDO? The worst thing that happens it he PDO just completes it with an error, right?

How could ROOT enumeration be any different than any other PDO enumeration?

I must be missing something and exposing myself as a huge dope so please, explain.

Thanks,
Dave Cattley


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

David R. Cattley wrote:


>
> Also note that for root enumerated stacks lower filters make no sense
> because io does not flow from the fdo to the pdo
>
>
>
>
>
> Huh?
>
>
>
> Why not? If the FDO throws an I/O request down the stack, why would
> it not hit lower filters? Are not lower filters between the FDO and
> PDO? The worst thing that happens it he PDO just completes it with
> an error, right?
>
>
>
> How could ROOT enumeration be any different than any other PDO
> enumeration?
>

Well, unlike other bus drivers, the ROOT bus doesn’t have any
functionality, so it’s not clear what IRPs would ever be sent down,
other than generic PnP and Power requests. However, you should
certainly be able to catch those in a root lower filter.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Ok, so perhaps we are crossing at different altitudes. I am totally aware
the PDO for a root enumerated device is, well, rather simple and does not
process any I/O of interest.

My point is that how a particular device stack divides the responsibility
between the various layers of Upper FiDO, FDO, and Lower FiDO device objects
is entirely its own to decide.

I have built device stacks that, for instance, have a NDIS Miniport as the
?FDO? (and power policy owner) but have Lower FiDOs that actually do stuff
quite important to the entire operation of the stack. The FDO uses QI to
get device interfaces or perhaps issues IRPs that terminate in the lower
FiDO. Sure, nothing ever gets to the PDO but that is besides the point.
The I/O surely does get to the lower FiDO.

And I have taken this same architecture an implemented it on top of a root
enumerated (that is to say, for test purposes) ?dummy? device with a
corresponding lower FiDO that exposes the expected interfaces to the NDIS
FDO but stubs them out.

It all works just charmingly.

So if you meant to say that a root enumerated PDO is not expecting an I/O
(outside of PnP/PO) then sure, I get that. But to say that you cannot send
I/O down the stack to a lower FiDO on a root enumerated stack seems a bit
too imprecise a way of making that point.

I could still be dope and please tell me so.

Cheers,

Dave

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, August 06, 2009 1:46 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] building a stack on ROOT

A root enumerated device has no lower layer protocol to talk to. What io is
the FDO going to send to the generic root PDO? the PDO does not understand
read/write/IOCTLs etc. A root enumerated FDO processes IO at its level and
either sends it to some other stack or completes the IO itself

d

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, August 06, 2009 10:27 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] building a stack on ROOT



Also note that for root enumerated stacks lower filters make no sense
because io does not flow from the fdo to the pdo



Huh?

Why not? If the FDO throws an I/O request down the stack, why would it not
hit lower filters? Are not lower filters between the FDO and PDO? The
worst thing that happens it he PDO just completes it with an error, right?

How could ROOT enumeration be any different than any other PDO enumeration?

I must be missing something and exposing myself as a huge dope so please,
explain.

Thanks,

Dave Cattley


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Yes, the idea is that for the most part io does not flow from the fdo down the stack so building a generic lower filter makes no sense. In your scenario where everything is packaged up as one big cohesive stack, a lower filter makes sense.

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, August 06, 2009 10:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] building a stack on ROOT

Ok, so perhaps we are crossing at different altitudes. I am totally aware the PDO for a root enumerated device is, well, rather simple and does not process any I/O of interest.

My point is that how a particular device stack divides the responsibility between the various layers of Upper FiDO, FDO, and Lower FiDO device objects is entirely its own to decide.

I have built device stacks that, for instance, have a NDIS Miniport as the ‘FDO’ (and power policy owner) but have Lower FiDOs that actually do stuff quite important to the entire operation of the stack. The FDO uses QI to get device interfaces or perhaps issues IRPs that terminate in the lower FiDO. Sure, nothing ever gets to the PDO but that is besides the point. The I/O surely does get to the lower FiDO.

And I have taken this same architecture an implemented it on top of a root enumerated (that is to say, for test purposes) ‘dummy’ device with a corresponding lower FiDO that exposes the expected interfaces to the NDIS FDO but stubs them out.

It all works just charmingly.

So if you meant to say that a root enumerated PDO is not expecting an I/O (outside of PnP/PO) then sure, I get that. But to say that you cannot send I/O down the stack to a lower FiDO on a root enumerated stack seems a bit too imprecise a way of making that point.

I could still be dope and please tell me so.

Cheers,
Dave

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, August 06, 2009 1:46 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] building a stack on ROOT

A root enumerated device has no lower layer protocol to talk to. What io is the FDO going to send to the generic root PDO? the PDO does not understand read/write/IOCTLs etc. A root enumerated FDO processes IO at its level and either sends it to some other stack or completes the IO itself

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, August 06, 2009 10:27 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] building a stack on ROOT


Also note that for root enumerated stacks lower filters make no sense because io does not flow from the fdo to the pdo


Huh?

Why not? If the FDO throws an I/O request down the stack, why would it not hit lower filters? Are not lower filters between the FDO and PDO? The worst thing that happens it he PDO just completes it with an error, right?

How could ROOT enumeration be any different than any other PDO enumeration?

I must be missing something and exposing myself as a huge dope so please, explain.

Thanks,
Dave Cattley


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer