lkml.org 
[lkml]   [2001]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[Q] mmap/munmap of physical address
Date
Hi,

I am fighting with a little problem here.
I have reserved a chunk of physical memory for my personnal
use and out of the kernel scope (linux mem=1024M).
I have now to handle this reserved memory by myself with
a simple scheme (I need BIG contiguous memory chunks (over
64Megs, and only few of them).
My idea was to create a driver for that memory & mmap()
in it. So far so good, I can mmap() from user side, driver
works fine as far as remap_page_range() is concerned.
Now comes the freeing/unmapping of those regions. I have
implemented my personnal vm_operations_struct to take care
of house keeping....
BUT
the close(struct vm_area_struct *vma) only gives me back
a virtual address, and a call to virt_to_phys(vma->start)
doesn't point back to the physical address I gave when mmaping.
As I have multiple processes, I cannot associate (virt addr,
phys addr) [2 processes could have the same virt addr pointing
to 2 different physical areas].

I am wondering if there is something totally obvious I am
missing there in the process (i.e., is there unmap_page_range
taking the virtual address as input... ;) )

Thanks in advance...


Christophe Beaumont

Sr Software Engineer Phone: 626-744-2078
Paracel, Inc. Fax: 626-744-2001
1055 East Colorado Blvd, email: chris.beaumont@paracel.com
Pasadena, CA 91106-2341 www: www.paracel.com



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:55    [W:0.040 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site