[VxW 6.x RTP] DMA in RTP application

[VxW 6.x RTP] DMA in RTP application

Post by Tomas Whit » Thu, 12 May 2011 03:49:21

Hi all,

We have written a driver that works with traditional VxWorks tasks (i.e.
kernel-mode apps). Our driver does DMA transfers given a buffer pointer
and a length (in kernel address space).

We also have an API library (currently built as a kernel-mode
downloadable module) which is not much more than a thin layer on top of
the usual open, ioctl, read, write, close etc. calls. This library
exists so that despite differences between how various operating systems
do things, the same API works on all platforms that we support (Linux,
Windows, VxWorks).

We would now like to make the driver compatible with both traditional
VxWorks tasks and RTPs (realtime processes). We have successfully built
the API library as a shared library for RTPs. So the remaining obstacles
to make the driver compatible with RTPs are are:

1. I don't know how to reliably tell, in the driver's open() handler, if
the caller is (a) a RTP task, or (b) a traditional VxWorks task. I think
the driver will need to know what kind of task has opened it in order to
do the right thing later, especially with regard to address translation.

It seems that taskInfoGet() might do it, but the Wind River docs don't
really mention anything about whether the returned information can be
used for that.

2. I don't know how to do the virtual -> kernel address translation
required for DMA transfers directly to/from an RTP application's
buffers. In every other OS, there's a mechanism for doing this. Is this
possible in VxWorks too?

Maybe we could have the RTP create a public shared memory object, but we
want to avoid this because we would have to introduce a bunch of new API
functions specifically for this purpose.

Also, we want our driver to be general purpose enough that it can DMA
to/from arbitrary buffers, whose allocation and creation may be under
control of some other layer of software in the RTP. So really we just
want to be able to take a (user-mode) pointer and length given to us by
the RTP app and use it for DMA, with the driver doing all the necessary
behind-the-scenes address translation, cache management etc.

There seem to be some virtual->physical address translation functions,
like vmTranslate(), but they take a parameter which is of type
VM_CONTEXT_ID. I don't know how to obtain that VM_CONTEXT_ID, or whether
it can even be obtained for a RTP and used to do what we want.

Any pointers as to how to proceed will be appreciated.


1. Open( ) calls in one RTP causing a socket failure in another RTP using Seaweed X11

2. Is there any way to access RTP /RTP API's without using RTC?


We are developing a VOD application on Windows CE 5.0. We want to use RTP
for audio-video data receice(transferred by server). But we dont want to use
RTC because we want DirectShow to decode media stream and also RTC does not
provide support for video data.

Is there any way to access RTP /RTP API's without using RTC? Or we have to
port another RTP stack? if yes than how.

Thanks in advance for your kind reply.

Jadav Bheda

3. RTP: Who will deny odd RTP (UDP) port numbers?

4. device driver needs to DMA from RTP task

5. Could RTP library be used in video conferencing application?

6. RTP server application for WinCE

7. Help Wanted: Experienced Windows Application Developer - RTP, North Carolina

8. Hooking RTP applications

9. Build RTP Application from the command line.

10. Help Wanted: Experienced Windows Application Developer - RTP, North Carolina

11. Error while launching RTP application in vxWorks 6.6