Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 1997 06:54:16 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        ccsanady@friley01.res.iastate.edu (Chris Csanady)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: DMA directly to user space?
Message-ID:  <199707131054.GAA10485@hda.hda.com>
In-Reply-To: <199707130702.CAA12323@friley01.res.iastate.edu> from Chris Csanady at "Jul 13, 97 02:02:25 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> The thing is, I am looking for a way to do this without copying any data.
> Is this possible?  Are there any existing devices that do such things?
> DMAing to userspace seems ideal, but I'm not sure how you could ensure
> that the memory is aligned and contiguous.  Or how to deal with the
> user/kernel space boundry crossing.

All raw I/O works that way.   Handle misaligned memory by faulting,
punting the issue back to the application.  Basically write a
strategy function and hook it in as a raw device and you'll have
read and write directly to the user space.

Non-contiguous memory must be handled either by the device hardware
via some flavor of scatter-gather hardware (hopefully you'll find
the device in question already does that) or by allocating contiguous
memory.


-- 
Peter Dufault (dufault@hda.com)   Realtime development, Machine control,
HD Associates, Inc.               Safety critical systems, Agency approval



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707131054.GAA10485>