diff options
author | sam <sam@FreeBSD.org> | 2002-10-04 20:40:39 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2002-10-04 20:40:39 +0000 |
commit | 1ba0866904d81527e87e7ca185303d932dcb43fc (patch) | |
tree | 2a99279aecd745558985c36259960a14ab6452aa /sys/amd64/include/bus_dma.h | |
parent | 451a9f90e16e09921a9b6bb02f0bc45c9272fba6 (diff) | |
download | FreeBSD-src-1ba0866904d81527e87e7ca185303d932dcb43fc.zip FreeBSD-src-1ba0866904d81527e87e7ca185303d932dcb43fc.tar.gz |
New bus_dma interfaces for use by crypto device drivers:
o bus_dmamap_load_mbuf
o bus_dmamap_load_uio
Test on i386. Known to compile on alpha and sparc64, but not tested.
Otherwise untried.
Diffstat (limited to 'sys/amd64/include/bus_dma.h')
-rw-r--r-- | sys/amd64/include/bus_dma.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/amd64/include/bus_dma.h b/sys/amd64/include/bus_dma.h index cb41b17..6790731 100644 --- a/sys/amd64/include/bus_dma.h +++ b/sys/amd64/include/bus_dma.h @@ -203,6 +203,29 @@ int bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, void *callback_arg, int flags); /* + * Like bus_dmamap_callback but includes map size in bytes. This is + * defined as a separate interface to maintain compatiiblity for users + * of bus_dmamap_callback_t--at some point these interfaces should be merged. + */ +typedef void bus_dmamap_callback2_t(void *, bus_dma_segment_t *, int, bus_size_t, int); +/* + * Like bus_dmamap_load but for mbufs. Note the use of the + * bus_dmamap_callback2_t interface. + */ +int bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, + struct mbuf *mbuf, + bus_dmamap_callback2_t *callback, void *callback_arg, + int flags); +/* + * Like bus_dmamap_load but for uios. Note the use of the + * bus_dmamap_callback2_t interface. + */ +int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map, + struct uio *ui, + bus_dmamap_callback2_t *callback, void *callback_arg, + int flags); + +/* * Perform a syncronization operation on the given map. */ void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); |