OpenQNX :: The QNX Community Portal

Oct 06, 2008 - 06:37 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 55 unlogged users and 2 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
miiso
Post subject: DMA mask  PostPosted: Mar 14, 2007 - 03:43 PM
Active Member


Joined: Mar 06, 2007
Posts: 12

Hi all!

My device for which I am porting a driver supports only addresses below 512 MB (29 bits). I want to allocate physically continous memory for DMA, but this memory because of the device have to be under 512MB. In linux there is pci_set_dma_mask() function used to handle this. How could I do this in QNX?

Thanks in advance.

Michal
 
 View user's profile Send private message  
Reply with quote Back to top
mario
Post subject: RE: DMA mask  PostPosted: Mar 14, 2007 - 04:12 PM
QNX Master


Joined: Sep 01, 2002
Posts: 2897

As far as I know not a mask but you can have it below 1M. Check the flags available for mmap.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
miiso
Post subject: RE: DMA mask  PostPosted: Mar 16, 2007 - 09:18 AM
Active Member


Joined: Mar 06, 2007
Posts: 12

Yes you are right, it can be done using mmap flags, but actually you can set it only under 16M or 64K with flags MAP_BELOW16M and MAP_NOX64K. I have found also mallopt() function, which can control memory allocation, but its M_MMAP_THRESHOLD flag is not working and is present only for compatibility reasons Sad
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.