LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

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

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


Hi,

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.

Regards
-Vijay S. Iyer
 
  


Reply

Tags
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 07:29 PM
API for mapping Physical Address to Virtual Address Lakshman_smt Linux - Software 2 10-15-2006 09:08 PM
Memory Mapping (same physical address = virtual address) skd.tech Linux - Kernel 7 07-24-2006 11:13 PM
mmap refused with 0x80000000 virtual address fannyl Programming 2 08-03-2004 01:43 AM
Getting Physical address in User Mode? marudhu Programming 4 02-23-2004 02:36 PM


All times are GMT -5. The time now is 06:54 AM.

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