Thread (27 messages) read the whole thread 27 messages, 7 authors, 2008-08-02

Re: how to allocate 9MB of memory in kernel ?

From: Arnd Bergmann <arnd@arndb.de>
Date: 2008-07-18 18:31:12

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 <><
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help