On 7/12/06, Rajat Jain <rajat.noida.india@xxxxxxxxx> wrote:
On 7/12/06, keshetti mahesh <k_mahesh85@xxxxxxxxxxx> wrote: > hi all, > > i have a problem with the following > in my driver, i have to allocate two physically contiguous chunks of 4MB in > kernel space and give it to hardware. > > now i am trying for a solution with which i can access those two chunks as > single chunk in the kernel space
I understand that you want to assign 2x4MB physical memory with 8MB virtually contiguous addresses. Why do you want to do that?
> It would be advisable to allocate the memory from the "high Memory" area (__GFP_HIGHMEM). Please note that pages allocated from high memory are not permanently mapped into kernel's address space (may not have a logical address). You must manuall map and unmap them as need (kmap() / kunmap())
kmap()/kunmap() gives access to one page at a time. It would not map 8MB at a time IIRC. if 8MB is physically contiguous, one can do ioremap(). Otherwise, I don't see a method. Let me look into this. Regards, Om. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/