Re: Mapping unused physical RAM to user space.

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

 



Hi,
You can map the reserved space ("mem=" bottline option) to the user space using mmap entrypoint which in turn can call the remap_page_range() for this reserved memory.
 
Regards,
Anj
----- Original Message -----
Sent: Tuesday, June 10, 2003 10:33 PM
Subject: Re: Mapping unused physical RAM to user space.

I am using mmap. That's how I can be using a nopage VMA operation.
Since I'm mapping RAM I can't use remap_page_range, so I use the
nopage VMA operation to return the proper page that a process should
use when it legitimately faults. This works fine for buffers allocated by
the kernel (kmalloc). For reserved buffers (these buffers are not allocated
by the kernel, they reside at the top of physical RAM but are ignored by
the kernel due to the "mem=XX" kernel parameter.) the page entries
don't appear to be valid.
 
Thanks!
 
Mike DeKoker

sridhar vaidyanathan <sridharv@ufl.edu> wrote:
Quoting Mike DeKoker :

>
> 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 Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

[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