Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ devflag(D1) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       devflag(D1)                                              devflag(D1)


       NAME
             devflag - driver flags

       SYNOPSIS
             #include <sys/conf.h>
             #include <sys/ddi.h>
             int prefixdevflag = 0;

       DESCRIPTION
             Every driver must define a global integer variable called
             prefixdevflag.  This variable contains a bitmask of flags used
             to specify the driver's characteristics to the system.

       USAGE
             The valid flags that may be set in prefixdevflag are:

                   D_DMA               The driver expects all buffers to be
                                       usable for DMA (Direct Memory
                                       Access).

                   D_TAPE              The driver controls a tape device
                                       (mount read-only; applicable only
                                       for block devices).

                   D_NOBRKUP           The driver understands page lists,
                                       that is, the I/O job is not broken
                                       up along page boundaries into
                                       multiple jobs by the kernel
                                       (applicable only for block devices).

             The following flag is valid for multiprocessor systems only:

                   D_MP                The driver is multithreaded (it
                                       handles its own locking and
                                       serialization).

             The following flags are valid for SVR4.2 MP systems only:

                   D_BLKOFF            The driver understands b_blkoff,
                                       specifying the byte offset within
                                       the block given by b_blkno at the
                                       beginning of a transfer [see
                                       buf(D4)].





                           Copyright 1994 Novell, Inc.               Page 1













      devflag(D1)                                              devflag(D1)


                  D_UPF               The multithreaded, multiplexing
                                      STREAMS driver has both upper and
                                      lower read and write service
                                      procedures.

            The following flags are valid only for systems on which the
            Enhanced Security Utilities are installed:

                  D_NOSPECMACDATA     MAC (Mandatory Access Control)
                                      checking is not performed during
                                      data transfers to and from the
                                      device controlled by the driver, and
                                      the access time field in the inode
                                      is not updated.

                  D_INITPUB           The device controlled by the driver
                                      is, by default, accessible by non-
                                      privileged processes.  This setting
                                      can be changed using a security
                                      system call.

                  D_RDWEQ             All accesses of the device
                                      controlled by the driver (both read
                                      and write) require strict equality
                                      under the MAC policy.

            If the driver sets the D_DMA flag, it does not have to worry
            about making kernel buffers addressable to its DMA controller.
            The kernel will make sure that any kernel buffer addresses
            passed to the driver's entry points will be addressable by the
            driver's hardware.

            If the driver uses buf_breakup(D3) or rdma_filter(D3) for DMA
            transfers, the D_DMA flag should not be set.

            If no flags are set for the driver, then prefixdevflag should
            be set to 0.

      REFERENCES
            buf_breakup(D3), physiock(D3), rdma_filter(D3)

      NOTICES
         Portability
            All processors




                          Copyright 1994 Novell, Inc.               Page 2













       devflag(D1)                                              devflag(D1)


          Future Directions
             D_DMA and D_TAPE are obsolete as of October 15, 1993, and will
             eventually be removed.













































                           Copyright 1994 Novell, Inc.               Page 3








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