Re: how to get a 64k DMA buffer for a user program?

Ingo Molnar (mingo@pc5829.hil.siemens.at)
Thu, 3 Apr 1997 01:52:46 +0200 (MET DST)


On Wed, 2 Apr 1997, Harald Koenig wrote:

> is there a simple hack for Linux 2.0.X that the kernel allocates a
> contigous 64k area of memory which then can be mmaped by a user program
> which is going to use this as DMA buffer then ?
>
> using a full kernel driver is no option (at least right now for first tests)
> and having this 64k locked, contiguous area seems to be enough for now
> (it's a PCI card, so there is no need for <16MB addresses).

allocating 64K in the kernel (get_free_pages is supposed to work up to
128K, if done early enough ... if not then start a clean-sweeper RT task
which cleans out user-space memory, frees it up and then triggers the
allocation). Then announce the physical address somehow to user-space,
then mmap /dev/kmem?

btw, who's gonna ACK the DMA interrupts ... or is the hw not using irqs?

-- mingo