IRQL in TDI filter dispatch functions

Hi

I’m developing a TDI filter driver.

a. According to the MSDN, IoCallDriver() can be called at IRQL <=
DISPATCH_LEVEL. Therefore, should I assume that it is possible for all
dispatch routines in my TDI filter to run at IRQL = DISPATCH_LEVEL? (According
to MSDN this rule is right for all kinds of filter drivers?)

b. My completion routines are being invoked in an arbitrary thread context
and probably at high IRQ. Is this also right for a TDI filter?

c. When code can run at IRQL => DISPATCH_LEVEL, all the allocations on the
STACK also need to be none paged? (Do I need to use paged_code macro or
something like that?)

Thanks.

“Zed y” wrote in message news:xxxxx@ntdev…
Hi

I’m developing a TDI filter driver.

a. According to the MSDN, IoCallDriver() can be called at IRQL <= DISPATCH_LEVEL. Therefore, should I assume that it is possible for all dispatch routines in my TDI filter to run at IRQL = DISPATCH_LEVEL? (According to MSDN this rule is right for all kinds of filter drivers?)

No, assume that all routines in your filter will be called at IRQL <= DISPATCH_LEVEL. Do NOT assume that they will be called at IRQL == DISPATCK_LEVEL. The TDI documentation for individual calls may specify more specific IRQL limitations that may in turn determine the IRQL seen for a specific call.

b. My completion routines are being invoked in an arbitrary thread context and probably at high IRQ. Is this also right for a TDI filter?

This is the safest assumption unless documentation specifically says otherwise.

c. When code can run at IRQL => DISPATCH_LEVEL, all the allocations on the STACK also need to be none paged? (Do I need to use paged_code macro or something like that?)

The stack does not need to be non-paged. HOWEVER, you must insure that you do NOT pass any stack variables to routines outside your own driver that may complete asynchronously.

Thomas F. Divine

Thanks.