DMA porting

Hi everybody,
i am new to QNX and i do not know much about many things. so please
forgive me i am asking u trivial questions. my advisor has entrusted me with
the task of porting some software written in QNX4 to QNX Neutrino.
i am porting DmaBuffer class (an utility class to be used in control
applications), which handles DMA services like allocating memory, obtaining
its physical and virtual address etc., from QNX4 to QNX Neutrino. It uses
functions like qnx_segment_*() . The related segment info data structures
are in sys/seginfo.h which is not there in Neutrino. could you please
suggest ways of porting this? also please let me know whether _PMF_DMA_HIGH,
_PMF_DMA_SAFE flags r used in QNX neutrino and if so where r they defined?
Any suggestions regarding how to handle DMA in
the Neutrino architecture will be greatly appreciated.
thanking you.
k.t.

Trayambaka Nath Karra <tkarra@ces.clemson.edu> wrote:

Hi everybody,
i am new to QNX and i do not know much about many things. so please
forgive me i am asking u trivial questions. my advisor has entrusted me with
the task of porting some software written in QNX4 to QNX Neutrino.
i am porting DmaBuffer class (an utility class to be used in control
applications), which handles DMA services like allocating memory, obtaining
its physical and virtual address etc., from QNX4 to QNX Neutrino. It uses
functions like qnx_segment_*() . The related segment info data structures
are in sys/seginfo.h which is not there in Neutrino. could you please
suggest ways of porting this? also please let me know whether _PMF_DMA_HIGH,
_PMF_DMA_SAFE flags r used in QNX neutrino and if so where r they defined?
Any suggestions regarding how to handle DMA in
the Neutrino architecture will be greatly appreciated.

Take a look at the docs for the mmap() function under QNX6. There is
a sample in there of allocating DMA safe memory. Essentially, it is
a lot shorter and easier than under QNX4. You will also want to look
at the mem_offset() function to get the physical address of your
allocated memory.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.