Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CRDDF(1)                        Domain/OS BSD                         CRDDF(1)




NAME
     crddf - create, display, or modify a device descriptor file

SYNOPSIS
     crddf [options ...] pathname

DESCRIPTION
     crddf creates, displays, or modifies a device descriptor file (DDF).  A
     DDF defines a peripheral bus unit (PBU) device for which you have written
     a driver. See Writing Device Drivers with GPIO Calls for details on both
     DDFs and PBUs.

     crddf is valid only if the general purpose input/output (GPIO) software
     is running on your network.

     pathname  (required)
                    Specify name of the DDF to be created, modified, or
                    displayed.

OPTIONS
     -              Read further options from standard input.  Signal
                    completion with -end.

     -at            Specifies that device lives on the AT-compatible bus.

     -call_library pathname
                    Specify pathname of the call side of the device driver
                    library. This option is required.

     -check         Check the DDF to ensure that all required fields have been
                    specified.

     -cleanup_routine [entry_name]
                    Specify the entry-point name of the clean-up routine in
                    the call library.  Omitting the entry name deletes a
                    previously existing clean-up routine.

     -csr_offset port_number
                    Specify the offset into the control status register (CSR)
                    page, in hexadecimal format, at which the device's
                    control/status registers are located.  Device drivers may
                    use this information during controller initialization.

     -csr_page iova Specify the hexadecimal address of the CSR page for the
                    device in the bus address space.  The following
                    information applies to the particular bus structure
                    implemented on your system:

                    ⊕   Multibus: optional

                    ⊕   VME bus: optional.  If specified, must be page-aligned
                        and in the range C000-D000.

                    ⊕   AT-compatible bus: If specified, may indicate a range
                        (for example, -csr_page 200 21F). If the second
                        parameter is missing, a range of 8 consecutive bytes
                        is assumed (for example, -csr_page 200 assumes a range
                        of  200-207).

     -debug         Sets a flag that can be used to turn on debugging logic in
                    a driver.

     -display       Display the current contents of the DDF.

     -dma_channel channel-number
                    Specifies to the driver the DMA channel number used by
                    AT-compatible device. This is a Version 3 option.

     -end           Close the updated DDF and exit.

     -initialization_routine entry_name (required)
                    Specify the entry-point name of the initialization routine
                    in the call library.

     -interrupt_library pathname
                    Specify the pathname of the interrupt side of the device
                    driver library.

     -interrupt_routine level [entry_name] (required)
                    Specify a level at which the device interrupts and the
                    entry-point name of an optional interrupt routine.

     -major ddevice_number
                    Specify the DDF's major device number in range 0-31.

     -minor ddevice_number
                    Specify the DDF's minor device number in range 0-511.

     -memory_base iova
                    Specify the MULTIBUS address that marks the base of a
                    controller's local memory.  If the specified iova  is less
                    than 64K this is a Version 2 option, if iova is greater
                    than 64K, this is a Version 3 option.

     -memory_size length
                    Specify the size, in hexadecimal format, of the controller
                    memory.  If the specified iova less than 64K, this is a
                    Version 2 option; if greater than 64K, this is a Version 3
                    option.

     -multiple      Specify that the device driver supports more than one
                    device and cause the crddf command to check the driver
                    entry-point names listed in the DDF for each device to
                    ensure that it doesn't load multiple copies of the same
                    driver.

     -node[f] {node number|*} (required)
                    Specify the hexadecimal node ID of the node to which the
                    device is physically connected. -nodef suppresses the
                    check which makes certain the node exists.  You may use an
                    asterisk (*) instead of the node ID to indicate the local
                    node.

     -quit          Exit without modifying the original DDF.

     -remddf //node name
                    Specify a remote node on which the DDF resides.

     -replace       Replace (i.e., overwrite) an existing DDF with a new
                    version.  To modify only selected portions of an existing
                    DDF, use -update.

     -revision [string]
                    Specify an optional revision number as an 8-character
                    string.

     -serial_number [string]
                    Specify an optional serial number as a 16-character
                    string.

     -share         Specify a DDF for a controller that can be shared among
                    multiple processes.

     -stack_size [decimal number]
                    Specify the number of bytes, in decimal, to be allocated
                    to the interrupt stack (default is 1024).

     -type type name
                    Specify the DDF's type.  The type must already be
                    installed on the node.

     -unit unit number (required)
                    Specify the unit number of the device (must be equal to
                    the lowest interrupt level on which the device
                    interrupts).

                    ⊕ MULTIBUS:    Must be in range 0-5.

                    ⊕ VME bus:     Must be in range 8-14.

                    ⊕ AT-compatible bus:
                                   Must be in range 0-15.


     -update        Modify selected portions of an existing DDF.  If this
                    option is specified, it must precede all other options on
                    the command line. To replace a DDF completely, use
                    -replace.

     -user_info [string]
                    Specify up to 64 characters of optional user information
                    (no embedded blanks).

     -vme           Specifies that device lives on VME bus. This is a Version
                    3 option.

     -20_bit_addressing
                    Specify 20-bit memory address size of controller.  You
                    must use PBU2 calls.

EXAMPLES
     1. Create a new DDF specifying only the required information.

        $ crddf /dev/mt0 -
          New DDF.
          > -unit 3
          > -node 2F
          > -csr_page 1400
          > -call_library /lib/mt.lib
          > -initialization_routine mt_$init
          > -interrupt_library /lib/mt.int.lib
          > -interrupt_routine 3 mt_$int
          > -check
          No missing fields.
          > -end
        $


     2. Display a DDF.

        $ crddf /dev/mt0 -display
          ddf version:   1
          device uid:    00030003 0000002F  (unit 3, node 2F)
          csr page iova: 1400
          call library:               /lib/mt.lib
          interrupt library:          /lib/mt.int.lib
          initialization entry point: mt_$init
          cleanup entry point:        mt_$cleanup
          interrupt stack size: 1024
          interrupt routines:
             level 0: [unused]
             level 1: [unused]
             level 2: [unused]
             level 3: mt_$int
             level 4: [unused]
             level 5: [unused]
             level 6: [unused]
             level 7: [unused]
             serial number:
             revision:
             user info:
        $


     3. Change the name of the interrupt routine in an existing DDF.

        $ crddf /dev/mt0 -update -interrupt_routine 3 mt_$sio


     4. Replace a DDF on the node //grip with a new version.

        $ crddf -remddf //grip /dev/x25 -
          > -replace
          > -unit 2
          > -node *
          > -call_library /sys/x25/x25_driver.lib
          > -interrupt_library /sys/x25/x25_driver_int.lib
          > -initialization_routine x25_driver_$init
          > -cleanup_routine x25_driver_$cleanup
          > -interrupt_routine 2 x25_driver_$int
          > -memory_base 7000
          > -memory_size 1000
          > -revision 7.0
          > -serial_number
          > -user_info release
          > -display
          > -end
        $


     5. Create a new DDF for a device that will be accessed through streams
        for the installed type foodev:

        $ crddf /dev/foodev -
          New DDF.
          > -unit 3
          > -node *
          > -csr_page 1400
          > -call_library /lib/foodev.lib
          > -initialization_routine foodev_$init
          > -interrupt_library /lib/foodev.int.lib
          > -interrupt_routine 3 mt_$int
          > -type foodev
          > -check
          No missing fields.
          > -end
        $

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