DMA verifier causing BSoD under XP

I implement BUS_INTERFACE_STANDARD and DMA_ADAPTER in my xen bus driver.
I understand that this is not really a supported thing to be doing, but
it is necessary for my drivers.

Under Windows 2003, it all works fine, with or without the verifier.

Under XP, NDIS 5.1 uses the scatter-gather functions of my DMA_ADAPTER
just like Windows 2003, but scsiport under XP uses
AllocateAdapterChannel etc while 2003 uses BuildScatterGatherList. When
I turn on DMA verification in the verifier I get a BSOD (0x0A).

I’ll post the stack trace etc when I can, but in the meantime is there
anything obvious that springs to anyone’s mind?

Thanks

James

>

I implement BUS_INTERFACE_STANDARD and DMA_ADAPTER in my xen bus
driver.
I understand that this is not really a supported thing to be doing,
but
it is necessary for my drivers.

Under Windows 2003, it all works fine, with or without the verifier.

Under XP, NDIS 5.1 uses the scatter-gather functions of my DMA_ADAPTER
just like Windows 2003, but scsiport under XP uses
AllocateAdapterChannel etc while 2003 uses BuildScatterGatherList.
When
I turn on DMA verification in the verifier I get a BSOD (0x0A).

I’ll post the stack trace etc when I can, but in the meantime is there
anything obvious that springs to anyone’s mind?

For posterity, the cause appears to be that I need to set up my
DMA_ADAPTER so that it looks like an ADAPTER_OBJECT (which isn’t
documented anywhere). I got the field definitions from ‘dt
ADAPTER_OBJECT’ in windbg and added them to my DMA_ADAPTER structure.
There are a few queue’s and lists there that I just initialised to empty
and it now doesn’t crash. Why must everything be so hard!!! :slight_smile:

James

>documented anywhere). I got the field definitions from 'dt

ADAPTER_OBJECT’ in windbg and added them to my DMA_ADAPTER structure.

Was this also the fix for the hibernation/crash dump path?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

>

>documented anywhere). I got the field definitions from ‘dt
>ADAPTER_OBJECT’ in windbg and added them to my DMA_ADAPTER structure.

Was this also the fix for the hibernation/crash dump path?

No. Turning on the verifier was the obvious next step in trying to
resolve that, but it led me onto this BSoD tangent. Now that that’s
fixed, hibernation still isn’t working.

James

>

For posterity, the cause appears to be that I need to set up my
DMA_ADAPTER so that it looks like an ADAPTER_OBJECT (which isn’t
documented anywhere). I got the field definitions from ‘dt
ADAPTER_OBJECT’ in windbg and added them to my DMA_ADAPTER structure.
There are a few queue’s and lists there that I just initialised to
empty
and it now doesn’t crash. Why must everything be so hard!!! :slight_smile:

It turns out that the above isn’t quite true. It didn’t crash, but it
didn’t work. By the time I did the above, I was trying to solve the
hibernation problem and so my xen drivers were all but inactive.

It appears that turning on DMA verification breaks 3rd party bus
supplied DMA_ADAPTER’s. Windows seems to call the methods belonging to
the verifier instead of mine.

I guess I just can’t use the DMA verifier.

James

Luckily I don’t think you need to for WHQL, but I could be wrong.
Mark Roddy

On Sat, Feb 21, 2009 at 6:16 AM, James Harper > wrote:

> >
> > For posterity, the cause appears to be that I need to set up my
> > DMA_ADAPTER so that it looks like an ADAPTER_OBJECT (which isn’t
> > documented anywhere). I got the field definitions from ‘dt
> > ADAPTER_OBJECT’ in windbg and added them to my DMA_ADAPTER structure.
> > There are a few queue’s and lists there that I just initialised to
> empty
> > and it now doesn’t crash. Why must everything be so hard!!! :slight_smile:
> >
>
> It turns out that the above isn’t quite true. It didn’t crash, but it
> didn’t work. By the time I did the above, I was trying to solve the
> hibernation problem and so my xen drivers were all but inactive.
>
> It appears that turning on DMA verification breaks 3rd party bus
> supplied DMA_ADAPTER’s. Windows seems to call the methods belonging to
> the verifier instead of mine.
>
> I guess I just can’t use the DMA verifier.
>
> James
>
>
> —
> 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
>