How to use the DMA Engine in FreeBSD?

Johannes Lundberg johalun0 at gmail.com
Thu Dec 13 11:16:33 UTC 2018


On 12/13/18 10:04 AM, Rajesh Kumar wrote:
> Hi,
>
> Is there any good documentation available to understand the existing
> support, API's and how-to use the DMA Engine in FreeBSD?
>
> I am trying to write a test driver which will use DMA Engine to do the data
> transfer (rather than plain memcpy which involves cpu).  Can anyone point
> to any driver implementation which has similar functions implemented?  I
> see references to SYS_RES_DRQ to allocate DMA channels and play around. But
> that seems to be specific to ISA. Can it be used for PCI drivers as well?

Hi

The book "FreeBSD Device Drivers" by Joseph Kong has an example. Not 
sure it matches exactly what you are looking for but it might help more 
than the FreeBSD source code which tends to lack documentation.

> Thanks,
> Rajesh.
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"


More information about the freebsd-drivers mailing list