DMA implementation in Jungo Drivers (PCIe)

Hi all,
I am performing DMA on PCIe based Altera Arria 2 board. I have installed Jungo Driver on it and am transferring 500kb of data from host PC(x86,win7) to the device.

Scenario 1:
In scatter gather DMA,

  1. Will WD_DmaLock() API return me the Scatter Gather List?

  2. If so,should I fill the descriptor table from the SG list thus obtained from WD_DmaLock API , to suit the device requirements?

  3. If I have to fill the descriptor table, should I lock the Descriptor table buffer as well?

Scenario 2:
In contiguous buffer DMA,

  1. Where do I have to assign the application buffer virtual address in WD_DmaLock() API?

Regards,
Arvind

You are going to hear it from many angles. Drop jungo. It is a piece of junk. Whatever you think it is buying you in terms of development time, you are going to lose a thousand fold due to Jungo’s buggy software.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@tataelxsi.co.in
Sent: Thursday, December 27, 2012 9:10 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] DMA implementation in Jungo Drivers (PCIe)

Hi all,
I am performing DMA on PCIe based Altera Arria 2 board. I have installed Jungo Driver on it and am transferring 500kb of data from host PC(x86,win7) to the device.

Scenario 1:
In scatter gather DMA,

  1. Will WD_DmaLock() API return me the Scatter Gather List?

  2. If so,should I fill the descriptor table from the SG list thus obtained from WD_DmaLock API , to suit the device requirements?

  3. If I have to fill the descriptor table, should I lock the Descriptor table buffer as well?

Scenario 2:
In contiguous buffer DMA,

  1. Where do I have to assign the application buffer virtual address in WD_DmaLock() API?

Regards,
Arvind


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

xxxxx@tataelxsi.co.in wrote:

I am performing DMA on PCIe based Altera Arria 2 board. I have installed Jungo Driver on it and am transferring 500kb of data from host PC(x86,win7) to the device.

Scenario 1:
In scatter gather DMA,

  1. Will WD_DmaLock() API return me the Scatter Gather List?

WD_DmaLock is a Jungo API. They’ll have to answer this question. The
first Google hit for “WD_DmaLock” goes to their online documentation,
which gives an example of scatter/gather DMA. You don’t get a
scatter/gather list, but you get the list of pages.

  1. If so,should I fill the descriptor table from the SG list thus obtained from WD_DmaLock API , to suit the device requirements?

As opposed to what? :wink: Note that we cannot possibly know the specifics
of your device’s DMA requirements.

  1. If I have to fill the descriptor table, should I lock the Descriptor table buffer as well?

Typically, a device’s descriptor table lives in device memory.
Otherwise, you get into a circular definition. If you have to DMA the
descriptor table, then you have to create descriptors for the descriptor
table.

Scenario 2:
In contiguous buffer DMA,

  1. Where do I have to assign the application buffer virtual address in WD_DmaLock() API?

If you use a common buffer, then WD_DmaLock allocates the memory, and it
is up to you to copy the application’s buffer to the contiguous buffer.


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

Listen to what Doron just said: You *really* want to get rid of the Jungo framework. It’s silly at best (there’s a VERY good built-in framework in Windows, WDF, and it’ll do everything you need, it’s solid, and it’s backed by Microsoft)… at worst, it’ll cause you to waste your time and effort and become frustrated.

Seriously. Just give up the Jungo idea. THEN we’ll help you here with your questions about how to write a proper KMDF driver for your DMA device.

Peter
OSR

Doron Holan wrote:

You are going to hear it from many angles. Drop jungo.
It is a piece of junk. Whatever you think it is buying you
in terms of development time, you are going to lose a
thousand fold due to Jungo’s buggy software.

Just out of curiosity I went and looked at the Jungo website. WinDriver is actively being updated and they just came out with a new version in September supporting Windows 8. Surely they’ve worked out the kinks by now, if they’re still successfully selling it?

With all due respect, their product is not junk.
It is a tool for rapid development of hardware and prototyping of the
drivers.
People who know how to use it correctly find it helpful and worth the
price.
When the hardware is ready, the crutches can (even should) be left behind.
However their marketing knows how people (and their managers) hate to
rewrite drivers, so
promote their product as a complete solution. Sometimes that even may be
true.
As usual, read the ads judiciously, divide the flies from cutlets.
– pa

wrote in message news:xxxxx@ntdev…
> Doron Holan wrote:
>
>> You are going to hear it from many angles. Drop jungo.
>> It is a piece of junk. Whatever you think it is buying you
>> in terms of development time, you are going to lose a
>> thousand fold due to Jungo’s buggy software.
>
> Just out of curiosity I went and looked at the Jungo website. WinDriver
> is actively being updated and they just came out with a new version in
> September supporting Windows 8. Surely they’ve worked out the kinks by
> now, if they’re still successfully selling it?
>