Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-28-2007, 03:10 AM   #1
LQ Newbie
Registered: Oct 2007
Posts: 0

Rep: Reputation: 0
Mmap and munmap physical address to user space


We have an ARM based platform running kernel v2.6.18.For a particular driver, a physical space of around 2MB is required which would be shared by the device, driver and the application. The memory requirement
changes from application to application, so a memory manager manages the physical memory allocation on this shared area.

The device has MMU so, it doesn't require contiguous physical memory. The only condition is that the user space address must be contigous.

In the implementation we have used mmap to get a range of user virtual address, but have delayed the association of user virtual address with kernel virtual address till the our memory manager gives us the physical pages. Which means that remap_pfn_range is not called will memory is allocated by the manager.

We are able to associate a non-contiguous physical memory with contiguous user space address. The problem is that, we want to dissociate the user space address and the physical memory when the memory manager frees the space.

We tried using zap_page_range which doesn't work. Also unmap_range was used which gave kernel panic.

Could anybody let us know what is the way to unmap in such cases, or else an alternate way to achieve the same.

-Vijay S. Iyer


mmap, space, user

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find physical address of kernel virtual address kushneeraj Programming 0 10-20-2006 08:29 PM
API for mapping Physical Address to Virtual Address Lakshman_smt Linux - Software 2 10-15-2006 10:08 PM
Memory Mapping (same physical address = virtual address) Linux - Kernel 7 07-25-2006 12:13 AM
mmap refused with 0x80000000 virtual address fannyl Programming 2 08-03-2004 02:43 AM
Getting Physical address in User Mode? marudhu Programming 4 02-23-2004 03:36 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration