| Author |
Message |
|
|
Post subject: DMA mask
Posted: 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 |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: DMA mask
Posted: 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. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: DMA mask
Posted: 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  |
|
|
| |
|
|
|
 |
|
|
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group Credits |
|
|