Hi all,
My apologies if this is a BASIC question. I am trying to figure out to translate the MDL to my adapter specific SG List. I have pages locked and ready to DMA. I was going through samples and documentation and found that I will have to get a DMAAdapter object and then use it’s functions to get the SGL which I will have to translate to my adapter specific descriptor.
My questions are:
-
My controller is PCIe Bus master full duplex DMA controller. It has two dma engines on it [one to give data to it and other to get data from it]. Will I need to get two DMAadapter objects [using IOGetDmaAdapter] to use these two DMA engines.
-
Who builds up this adapter object in PDO? How does it know the DMA capabilities of the hardware? If there are two DMA engines on my PCIe controller will there be two seperate adapter objects? Will they be synchronized in any way compromising the full-duplex nature of these two DMA engines.
-
Is there any way I could build up the SGL without actually using any Adapter object? Since my DMA interfaces are exported as MMIO addresses I can use then directly if I can build the SGL using the MDL that comes in my IRP.
Any help is highly appriciated.
Thanks,
DC.
Sneak preview the all-new Yahoo.com. It’s not radically different. Just radically better.
1 - You’re probably okay with one DMA adapter object to share between
the two channels.
2 - You tell the DMA DDI what your devices capabilities are (can it do
32 & 64 bit DMA, can it do scatter gather, etc…) when you get your
DMA_ADAPTER. The HAL tracks some other information about what the path
to your device can do (mostly can it do 32 & 64 bit DMA).
3 - Nope - go through the adapter object.
I’ve been writing about DMA on my blog for the last couple months - some
of that may help you understand how things get put together:
http://blogs.msdn.com/peterwie.
-p
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Driver Coder
Sent: Wednesday, May 17, 2006 12:06 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Building SG List from MDL
Hi all,
My apologies if this is a BASIC question. I am trying to figure out
to translate the MDL to my adapter specific SG List. I have pages locked
and ready to DMA. I was going through samples and documentation and
found that I will have to get a DMAAdapter object and then use it’s
functions to get the SGL which I will have to translate to my adapter
specific descriptor.
My questions are:
-
My controller is PCIe Bus master full duplex DMA controller. It has
two dma engines on it [one to give data to it and other to get data from
it]. Will I need to get two DMAadapter objects [using IOGetDmaAdapter]
to use these two DMA engines.
-
Who builds up this adapter object in PDO? How does it know the DMA
capabilities of the hardware? If there are two DMA engines on my PCIe
controller will there be two seperate adapter objects? Will they be
synchronized in any way compromising the full-duplex nature of these two
DMA engines.
-
Is there any way I could build up the SGL without actually using any
Adapter object? Since my DMA interfaces are exported as MMIO addresses I
can use then directly if I can build the SGL using the MDL that comes in
my IRP.
Any help is highly appriciated.
Thanks,
DC.
Sneak preview the all-new Yahoo.com
http: . It’s
not radically different. Just radically better. — Questions? First
check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</http:>
> 1. My controller is PCIe Bus master full duplex DMA controller. It has two
dma
engines on it [one to give data to it and other to get data from it]. Will I
need to
get two DMAadapter objects [using IOGetDmaAdapter] to use these two DMA
engines.
No need.
- Who builds up this adapter object in PDO?
Underlying bus driver or a filter - PCI.SYS or ACPI.SYS.
How does it know the DMA capabilities of the hardware?
Using ACPI stuff and the DEVICE_DESCRIPTION structure you have provided.
If there are two DMA engines on my PCIe controller will there be two seperate
adapter objects?
No need.
- Is there any way I could build up the SGL without actually using any
Adapter
object?
No. All of such ways are problematic and can cause harm on some architectures
(x64, PAE, RAM > 4GB etc).
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com