Allocating a cache-safe buffer for DMA devices and drivers

Garcia Jérémie GARCIAJ at
Mon Aug 29 19:16:14 EST 2005

Hi everybody, I have to port a vxWorks appz to Linux Montavista running on a powerPC 405EP based architecture.
In this one, we use the following vxWorks system call: cacheDmaMalloc( ) whose man page is :

    cacheDmaMalloc( ) - allocate a cache-safe buffer for DMA devices and drivers

void * cacheDmaMalloc
    size_t bytes              /* number of bytes to allocate */

    This routine returns a pointer to a section of memory that will not experience any cache coherency problems. Function pointers in the CACHE_FUNCS structure provide access to DMA support routines.

    A pointer to the cache-safe buffer, or NULL. 

I need to handle the given amount of memory from the user space. 
So could anyone told how to achieve the same goal on Linux with these constraints?

Tks a lot for your precious help!

More information about the Linuxppc-dev mailing list