Avstream scatter mappings

Hi All,

I am facing an issue related to AVstream scatter mappings.I am trying to
write data to the scatter mappings using my hardware DMA. I am getting
all the output buffer mappings using KSSTREAM_POINTER strucure. But
somehow, my DMA is unable to write to these addresses.
If I use common buffer approach as the output buffer. My DMA is ABLE to
write to it.

I am in delimma now, whether the DMA is messing up or my mappings are
incorrect. Any ideas??

Thanks & Regards
Abhishek Joshi

Abhishek Joshi wrote:

Hi All,

I am facing an issue related to AVstream scatter mappings.I am trying
to write data to the scatter mappings using my hardware DMA. I am
getting all the output buffer mappings using KSSTREAM_POINTER
strucure. But somehow, my DMA is unable to write to these addresses.
If I use common buffer approach as the output buffer. My DMA is ABLE
to write to it.

I am in delimma now, whether the DMA is messing up or my mappings are
incorrect. Any ideas??

What does “unable to write” mean? If you are doing DMA, then it’s going
somewhere. Have you checked that the physical addresses you are writing
actually match the buffers you were given?


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

How can I check that?

Thanks & Regards
Abhishek Joshi

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Thursday, April 17, 2008 11:34 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Avstream scatter mappings

Abhishek Joshi wrote:

Hi All,

I am facing an issue related to AVstream scatter mappings.I am trying
to write data to the scatter mappings using my hardware DMA. I am
getting all the output buffer mappings using KSSTREAM_POINTER
strucure. But somehow, my DMA is unable to write to these addresses.
If I use common buffer approach as the output buffer. My DMA is ABLE
to write to it.

I am in delimma now, whether the DMA is messing up or my mappings are
incorrect. Any ideas??

What does “unable to write” mean? If you are doing DMA, then it’s going
somewhere. Have you checked that the physical addresses you are writing
actually match the buffers you were given?


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


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

Abhishek Joshi wrote:

How can I check that?

There are several ways. In the debugger, use the !pte command:

lkd> !pte e1200000
VA e1200000
PDE at 00000000C0603848 PTE at 00000000C0709000
contains 00000000075A6863 contains 0000000021CAB963
pfn 75a6 —DA–KWEV pfn 21cab -G-DA–KWEV

Notice the second “pfn” in the last line; that tells you the physical
page number. Add three zeros to that to get the physical address. In
this case, virtual address e1200000 maps to physical address 21cab000.

You can double check this by dumping by physical address with !dd:

lkd> dd e1200000 << virtual
e1200000 ffffffe8 00300031 00300030 00300030
e1200010 00000030 00262b98 fffffff0 00050002
e1200020 02000002 00260400 ffffffd8 000d6b76
e1200030 80000004 0000001e 00000004 00260001
e1200040 4855524d 447a726f 436b636f 00265959
e1200050 ffffffd8 000d6b76 80000004 00000000
e1200060 00000004 00260001 5655524d 44747265
e1200070 436b636f 00262b58 ffffffe8 00730075
lkd> !dd 21cab000 << physical
#21cab000 ffffffe8 00300031 00300030 00300030
#21cab010 00000030 00262b98 fffffff0 00050002
#21cab020 02000002 00260400 ffffffd8 000d6b76
#21cab030 80000004 0000001e 00000004 00260001
#21cab040 4855524d 447a726f 436b636f 00265959
#21cab050 ffffffd8 000d6b76 80000004 00000000
#21cab060 00000004 00260001 5655524d 44747265
#21cab070 436b636f 00262b58 ffffffe8 00730075


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