how to allocate 9MB of memory in kernel ?
Arnd Bergmann
arnd at arndb.de
Sat Jul 19 01:39:10 EST 2008
On Friday 18 July 2008, Misbah khan wrote:
> Now my concern is How can i map SDRAM one to one to circular buffer of such
> a huge size ????
As I mentioned, use vmalloc to get the memory, and provide an mmap function
that uses remap_vmalloc_range to put it into the user address space.
> My idea is that i will ioreamp SDRAM and do memcpy_toio() when ever i am
> writing to the the circular buffer which is dma allocated and pages are set
> reserved . and read the frame from user space .
ioremap and memcpy_toio style accesses only make sense for stuff that is
*not* your main memory. Memory is alrady directly accessible in the kernel
after allocating with get_free_pages, kmalloc or vmalloc. No need to
play with __iomem pointers for this.
Arnd <><
More information about the Linuxppc-embedded
mailing list