Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Help me with Big physical mem alloc in linux!
@ 2000-05-01  8:52 ysz
  2000-05-01 15:48 ` W Bauske
  0 siblings, 1 reply; 3+ messages in thread
From: ysz @ 2000-05-01  8:52 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 881 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help me with Big physical mem alloc in linux!
  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
  0 siblings, 1 reply; 3+ messages in thread
From: W Bauske @ 2000-05-01 15:48 UTC (permalink / raw)
  To: axp-list

> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help me with Big physical mem alloc in linux!
  2000-05-01 15:48 ` W Bauske
@ 2000-05-01 17:29   ` Blake Carlson
  0 siblings, 0 replies; 3+ messages in thread
From: Blake Carlson @ 2000-05-01 17:29 UTC (permalink / raw)
  To: axp-list

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-05-01 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox