Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Blake Carlson <blake-carlson@uiowa.edu>
To: axp-list@redhat.com
Subject: Re: Help me with Big physical mem alloc in linux!
Date: Mon, 1 May 2000 12:29:52 -0500 (CDT)	[thread overview]
Message-ID: <Pine.LNX.4.10.10005011221010.22052-100000@cobra.eng.uiowa.edu> (raw)
In-Reply-To: <390DA73F.9D0C29F5@paralleldata.com>

On Mon, 1 May 2000, W Bauske wrote:

> > ysz wrote:
> > 
> > My driver need a big physical memory (larger than one page) for DMA,
> > but i found nothing API to do that when I search kernel source.
> > Could somebody give me a hint about it? I have heard before that there's a
> > kernel patch to do that,but where's it and can any kernel API  do it?
> > thanks,I'm a newbie in kernel programming and very excited in this mail list
> > to ask for help.
> >                 pubb
> 
> Try looking at linux/drivers/scsi/st.c. It uses quite fancy
> DMA memory allocation and I've used it for quite large data
> blocks.
> 
> 
> Wes
> 
> 

Here's a pretty nasty hack I've used in the past (though I don't remember
the exact details).  In the "Linux Device Drivers" book, there's a section
that describes how to tell the kernel to use less of the physical
memory than is actually available.  For instance, if you have 128 MB of
RAM you give the boot flag MEM=126.  Now you can use these upper 2MB as
you please since it is not managed by the kernel. The only trick is to 
address the memory with it's physical address rather than a  virtual
address.

Yes, it's kind of nasty and requires special bootflags, but it helped me
avoid this DMA problem long enough to decide I didn't want to write a
driver any more!  :)  

- Blake


blake-carlson@uiowa.edu
College of Engineering Imaging Group
University of Iowa


      reply	other threads:[~2000-05-01 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-01  8:52 Help me with Big physical mem alloc in linux! ysz
2000-05-01 15:48 ` W Bauske
2000-05-01 17:29   ` Blake Carlson [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox