Re: Mapping unused physical RAM to user space.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Mike DeKoker <mdekoker@yahoo.com>:

> 
> I am developing a module for a PCI device. In order to get large enough 
> DMA buffers, I am reserving the upper N megabytes of RAM (via the 
> kernel parameter "mem=") and using ioremap to get at the buffer from
> within the kernel. This is all fine and dandy, I can do DMA transfers 
> to/from my device just fine. My question is, is it possible to map 
> this DMA buffer into user space? 
> 
> For smaller, kmalloc'd DMA buffers I can map into user space easily by 
> manually returning the correct page with VM no_page operation. It 
> doesn't look like I can do this using reserved buffers because the 
> page structures don't appear to be valid. (Reserved buffer page indices 
> >= max_mapnr).
> 
> Thanks for your time,
> Mike DeKoker
> Signatec, Inc.
> 
I think you will have to implement mmap() for your driver.Check Linux Device 
Drivers, Rubini for more information.
-sridhar
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux