On Sat, 13 Mar 1999, Brandon Itkowitz wrote:
> Does anyone have experience with using DMA under RTL? I'm trying to set up
> a producer/consumer circular buffer model in a user space application when
> the producer data comes from a kernel module using DMA. Alessandro Rubini
> gives some hints on how to manage the memory allocation within kernel space
> in his book "Linux Device Drivers". However, I couldn't find any leads on
> how to properly handle either user space access to kernel memory, or the
> most efficient way to copy the contents of kernel pages to user space
> pages.
I have working implementation in
http://crds.chemie.unibas.ch/PCI-MIO-E/pci-mio-e-linux-0.1.5.tgz
(sorry, this is work in progress, you will need some additional tools and
header files in /usr/local/include to get it compiled. But I will answer any
questions. Much of the code is left over testing phase)
Especially look into:
http://crds.chemie.unibas.ch/PCI-MIO-E/linux-0.1.5/lddk_try/ni_pci_mio.ddl
the code afer "if(vma->vm_offset==PCI_MIO_DMA_MMAP)" is what you need. You
may safely ignore the rest of this rubbish.
BTW. I was always suprised why RT-Linux uses that method of leaving some free
memory on system startup and then mmaping it, instead of allocating arbitrary
block(s) of memory in the kernel and then mmaping them? Is anyone interested
in implementing mmap function for RT-FIFOs? (mmap can be done on some
device file, rtfifos fit well here. So I am not thinking about mmaping of
RT-FIFO buffers, but adding additional functionality to the driver).
Regards,
--
Tomasz Motylewski
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/