Nachum Kanovsky wrote: 

> > Can anyone tell me how to go about allocating large physical memory for use
> > by dma and usermode programs. I used to use bigphysarea_alloc,
> > mem_map_reserve - and then for mapping I would set the vma to VM_LOCKED and
> > I would call remap_page_range.
> >
> > What do I do with kernel 2.6 for this?

How big is big, and more importantly, does it need to be physically
contiguous? 

On Thu, May 06, 2004 at 05:12:53PM +0300, Gilad Ben-Yossef wrote:

> I'm might be smoking crack here, but I seem to remember that bigphysarea was 
> an outside patch and not part of Linus vanilla kernel. Not sure about it 
> though.

That's what I recall as well. 

> BTW, one extremly ugly trick you can do without this patch is to use the 
> kernel boot parameter "mem=" to create a "hole" in the memory map that is 
> managed by the kernel (same thing that happens for video card "stolen" 
> memroy, really) and simply mem_map_reserve and remap_page_range it. But I 
> wouldn't recomend going this way for anything which is not an embedded system 
> that you have absolute control over and even then it's ugly.

You also need to be sure your arch doesn't have weird memory setups
with holes that must not be writen to above what you give mem, since
the kernel believes you and does not protect you from using these
holes. Also, at least on one arch, the kernel will happily scribble
above what you give mem. 

Cheers, 
Muli 

-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

Attachment: signature.asc
Description: Digital signature

Reply via email to