Author: scottl
Date: Mon Sep 14 06:26:36 2020
New Revision: 365707
URL: https://svnweb.freebsd.org/changeset/base/365707

Log:
  Update bus_dma.9 for the expanded template API.  Add some
  clarifying language about the operation of parent tags in templates.

Modified:
  head/share/man/man9/bus_dma.9

Modified: head/share/man/man9/bus_dma.9
==============================================================================
--- head/share/man/man9/bus_dma.9       Mon Sep 14 05:58:12 2020        
(r365706)
+++ head/share/man/man9/bus_dma.9       Mon Sep 14 06:26:36 2020        
(r365707)
@@ -63,6 +63,8 @@
 .Nm bus_dma_template_init ,
 .Nm bus_dma_template_tag ,
 .Nm bus_dma_template_clone ,
+.Nm bus_dma_template_fill,
+.Nm BUS_DMA_TEMPLATE_FILL,
 .Nm bus_dmamap_create ,
 .Nm bus_dmamap_destroy ,
 .Nm bus_dmamap_load ,
@@ -90,19 +92,29 @@
 .Fn bus_dma_tag_destroy "bus_dma_tag_t dmat"
 .Ft void
 .Fo bus_dma_template_init
-.Fa "bus_dma_template_t template"
+.Fa "bus_dma_template_t *template"
 .Fa "bus_dma_tag_t parent"
 .Fc
 .Ft int
 .Fo bus_dma_template_tag
-.Fa "bus_dma_template_t template"
+.Fa "bus_dma_template_t *template"
 .Fa "bus_dma_tag_t *dmat"
 .Fc
 .Ft void
 .Fo bus_dma_template_clone
-.Fa "bus_dma_template_t template"
+.Fa "bus_dma_template_t *template"
 .Fa "bus_dma_tag_t dmat"
 .Fc
+.Ft void
+.Fo bus_dma_template_fill
+.Fa "bus_dma_template_t *template"
+.Fa "bus_dma_param_t params[]"
+.Fa "u_int count"
+.Fc
+.Fo BUS_DMA_TEMPLATE_FILL
+.Fa "bus_dma_template_t *template"
+.Fa "bus_dma_param_t param ..."
+.Fc
 .Ft int
 .Fn bus_dmamap_create "bus_dma_tag_t dmat" "int flags" "bus_dmamap_t *mapp"
 .Ft int
@@ -697,8 +709,12 @@ Initializes a
 .Fa bus_dma_template_t
 structure.  If the
 .Fa parent 
-argument is non-NULL, values from this tag will be copied into the template,
-replacing any defaults.
+argument is non-NULL, this parent tag is associated with the template and
+will be compiled into the dma tag that is later created.  The values
+of the parent are not copied into the template.  During tag creation in
+.Fn bus_dma_tag_template ,
+any parameters from the parent tag that are more restrictive than what is
+in the provided template will overwrite what goes into the new tag.
 .It Fn bus_dma_template_tag "*template" "*dmat"
 Unpacks a template into a tag, and returns the tag via the
 .Fa dmat .
@@ -712,6 +728,31 @@ The template does not need to be initialized first.  A
 be overwritten by the values contained in the tag.  When paired with
 .Fn bus_dma_template_tag ,
 this function is useful for creating copies of tags.
+.It Fn bus_dma_template_fill "*template" "params[]" "count"
+Fills in the selected fields of the template with the keyed values from the
+.Fa params
+array.  This is not meant to be called directly, use
+.Fn BUS_DMA_TEMPLATE_FILL
+instead.
+.It Fn BUS_DMA_TEMPLATE_FILL "*template" "param ..."
+Fills in the selected fields of the template with a variable number of
+key-value parameters.  The macros listed below take an argument of the
+specified type and encapsulate it into a key-value structure that is directly
+usable as a parameter argument.  Muliple parameters may be provided at once.
+.Bd -literal
+       BD_PARENT()     void *
+       BD_ALIGNMENT()  uintmax_t
+       BD_BOUNDARY()   uintmax_t
+       BD_LOWADDR()    vm_paddr_t
+       BD_HIGHADDR()   vm_paddr_t
+       BD_MAXSIZE()    uintmax_t
+       BD_NSEGMENTS()  uintmax_t
+       BD_MAXSEGSIZE() uintmax_t
+       BD_FLAGS()      uintmax_t
+       BD_LOCKFUNC()   void *
+       BD_LOCKFUNCARG() void *
+.Ed
+.Pp
 .It Fn bus_dmamap_create "dmat" "flags" "*mapp"
 Allocates and initializes a DMA map.
 Arguments are as follows:
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to