[Q] mmap/munmap of physical address

Christophe Beaumont (christophe@paracel.com)
Thu, 28 Jun 2001 18:08:17 -0700


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/