[wdmaudiodev] Re: IDMAChannel::CopyTo and IRQL level

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 27 May 2016 09:57:24 -0700

Matthieu Collette wrote:


I am developing a virtual audio driver and wonder if, in such case,
IDMAChannel::CopyTo can be called at any IRQL > DISPATCH_LEVEL ?

The following documentation mention that the method can be called at
ANY IRQL
https://msdn.microsoft.com/en-us/library/windows/hardware/ff536558(v=vs.85).aspx
<https://msdn.microsoft.com/en-us/library/windows/hardware/ff536558%28v=vs.85%29.aspx>

What do you think ?

As I said in the [ntdev] group, if you are driving a genuine hardware
device, then CopyFrom and CopyTo are doing DMA work and might be called
in an ISR, in response to a "DMA complete" interrupt.  In that case, you
will run at the hardware's interrupt IRQL (referred to in the docs as
DIRQL).

If your driver is not working with real hardware, then there are no
circumstances that will result in your driver running higher than
DISPATCH_LEVEL.  All of the higher levels are hardware-related.

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

Other related posts: