DragonFly BSD
DragonFly kernel List (threaded) for 2006-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

mapping user space buffer


From: "Chuck Tuffli" <ctuffli@xxxxxxxxx>
Date: Tue, 8 Aug 2006 12:55:05 -0700

I have a driver that supports DMA of user space buffers and had a
couple of questions. The ultimate question (I think) is how to
lock/map/unmap/unlock user space virtual addresses. A quick perusal of
some drivers turned up two approaches: vmapbuf() and the
bus_dmamap_load*() routines. The source for each makes them look
similar, but are they equivalent? Is one preferable? In both cases, it
appears that the driver must first call vslock() on the user virtual
address (and then vsunlock after the transfer completes). Are there
other necessary steps? Is there a good driver that I can use to answer
some of these questions? As usual, TIA.

---chuck



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]