lkml.org 
[lkml]   [2000]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Large (~2MB) PCI-DMA buffer
On Thu, Jan 06, 2000 at 01:21:46PM -0300, Daniel Serpell wrote:
> Hi!
>
> I'm writing a driver for a PCI adquisition board (this board
> is custom-made from an amcc9533 and FPGA logic, so this driver isn't
> intended for production use), and I need to get a large, about 2M
> bytes, buffer of contiguous PCI memory (ie, it's PCI address has to be
> on one large block) to do busmaster transfers. Also, I need to mmap
> this buffer to user space.

You have two choices.
1. Buy better hardware, as our Lord and Master told us a galaxy
away and long, long ago... (ouch)
2. Use __get_free_pages() for a range of pages. This will fail
eventualy when the memory gets more and more fragmented.
3. Use bigphysarea (http://www.polyware.nl/~middelin/En/hobbies.html)
(it lacks documentation, on purpose; since that leaves time to
perfect the program :)

[snip]
> I suspect that I'm doing something wrong, so mi question is:
> Is there any info in how to use large DMA buffers ? Any existing
> driver has code to dealing with this?

the zr36120 framegrabber has the same problem. Fixed by
doing getfreepages of bigphysarea if that's compiled in.
It does user mapping too (look at zoran_mmap)

> I think that with a good writen driver to start with, I could
> write mine.

Good luck :)

Met vriendelijke groet,
Pauline Middelink
--
PGP Key fingerprint = DE 6B D0 D9 19 AD A7 A0 58 A3 06 9D B6 34 39 E2
For more details look at my website http://www.polyware.nl/~middelin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.095 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site