Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dma_cb(D4) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       dma_cb(D4)                                                dma_cb(D4)


       NAME
             dma_cb - DMA command block structure

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/dma.h>
             #include <sys/ddi.h>

       DESCRIPTION
             The DMA command block structure is used to control a DMA
             operation.

       USAGE
             Each DMA operation requested by a driver is controlled by a
             command block structure whose fields specify the operation to
             occur.

             A number of fields of the DMA control block come in pairs: one
             for the requestor and one for the target.  The requestor is
             the hardware device that is requesting the DMA operation,
             while the target is the target of the operation.  The typical
             case is one in which the requestor is an I/O device and the
             target is memory.

             DMA command block structures should only be allocated via
             dma_get_cb(D3).  Although drivers may access the structure
             members listed below, they should not make any assumptions
             about the size of the structure or the contents of other
             fields in the structure.

          Structure Definitions
             The dma_cb structure contains the following members:

             struct dma_buf  *targbufs;   /* list of target data buffers */
             struct dma_buf  *reqrbufs;   /* list of requestor data buffers */
             uchar_t         command;     /* Read/Write/Translate/Verify */
             uchar_t         targ_type;   /* Memory/IO */
             uchar_t         reqr_type;   /* Memory/IO  */
             uchar_t         targ_step;   /* Inc/Dec/Hold  */
             uchar_t         reqr_step;   /* Inc/Dec/Hold  */
             uchar_t         trans_type;  /* Single/Demand/Block/Cascade */
             uchar_t         targ_path;   /* 8/16/32 */
             uchar_t         reqr_path;   /* 8/16/32 */
             uchar_t         cycles;      /* 1 or 2 */




                           Copyright 1994 Novell, Inc.               Page 1













      dma_cb(D4)                                                dma_cb(D4)


            uchar_t         bufprocess;  /* Single/Chain/Auto-Init */
            char            *procparam;  /* parameter buffer for appl call */
            int             (*proc)();   /* address of application call routines */

            The members of the dma_cb structure are:

            targbufs is a pointer to a list of DMA buffer structures [see
            dma_buf(D4)] that describes the target of the DMA operation.

            reqrbufs is a pointer to a list of DMA buffer structures [see
            dma_buf(D4)] that describes the requestor of the DMA
            operation.

            command specifies the command for the DMA operation.  It may
            be one of the following values:

                  DMA_CMD_READ      Specifies a DMA read from the target
                                    to the requestor.

                  DMA_CMD_WRITE     Specifies a DMA write from the
                                    requestor to the target.

            targ_type and reqr_type specify the type of the target and
            requestor, respectively.  They each may have one of the
            following values:

                  DMA_TYPE_MEM      Specifies that the target (or
                                    requestor) is memory.

                  DMA_TYPE_IO       Specifies that the target (or
                                    requestor) is an I/O device.

            targ_step and reqr_step specify how the target and requestor
            addresses are to be modified after each transfer.  They each
            may have one of the following values:

                  DMA_STEP_INC      Specifies that the target (or
                                    requestor) address is to be
                                    incremented following each data
                                    transfer.

                  DMA_STEP_DEC      Specifies that the target (or
                                    requestor) address is to be
                                    decremented following each data
                                    transfer



                          Copyright 1994 Novell, Inc.               Page 2













       dma_cb(D4)                                                dma_cb(D4)


                   DMA_STEP_HOLD     Specifies that the target (or
                                     requestor) address is to remain the
                                     same following each data transfer.

             trans_type specifies the transfer type of the operation.  It
             can have one of the following values:

                   DMA_TRANS_SNGL    Specifies that a single transfer is to
                                     occur.

                   DMA_TRANS_BLCK    Specifies that a block transfer is to
                                     occur.  This is the only acceptable
                                     value for software-initiated
                                     transfers.

                   DMA_TRANS_DMND    Specifies demand transfer mode, which
                                     is a variation on block transfer in
                                     which the requestor may provide
                                     additional control flow on the
                                     transfer.

             targ_path and reqr_path specify the size of the data path for
             the target and requestor, respectively.  They each may have
             one of the following values:

                   DMA_PATH_8        Specifies that the target (or
                                     requestor) uses an eight-bit data
                                     path.

                   DMA_PATH_16       Specifies that the target (or
                                     requestor) uses a 16-bit data path.

                   DMA_PATH_32       Specifies that the target (or
                                     requestor) uses a 32-bit data path.

                   DMA_PATH_64       Specifies that the target (or
                                     requestor) uses a 64-bit data path.

             cycles is an integer that specifies the number of cycles
             required for each transfer.  Its value should be taken from
             the result of dma_get_best_mode(D3).

             bufprocess specifies how the DMA target buffer structures are
             to be processed.  It may have the following values:




                           Copyright 1994 Novell, Inc.               Page 3













      dma_cb(D4)                                                dma_cb(D4)


                  DMA_BUF_SNGL      Specifies that the target consists of
                                    a single DMA Buffer.

                  DMA_BUF_CHAIN     Specifies that the target consists of
                                    a chain of DMA Buffers.

            procparam is the parameter to be passed to the subroutine
            specified by the proc field.

            proc specifies the address of a routine to be called when a
            DMA operation is successfully set up by dma_swsetup(D3).  The
            value in the procparam field is passed as an argument to this
            routine.  This field may be set to NULL if no procedure is to
            be called.

      REFERENCES
            dma_buf(D4), dma_free_cb(D3), dma_get_cb(D3),
            dma_get_best_mode(D3), dma_prog(D3), dma_swsetup(D3),
            dma_swstart(D3)

      NOTICES
         Portability
            AT-compatible architectures

         Future Directions
            This structure is expected to be replaced or modified in a
            future release.





















                          Copyright 1994 Novell, Inc.               Page 4








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026