Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ crddf — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

7.0;crddf (create_ddf), revision 7.0, 86/10/14
CRDDF (CREATE_DDF) -- Create, display, or modify a Device Descriptor File.


FORMAT

  CRDDF pathname [options ...]


  This command is valid only if our General Purpose Input/Output (GPIO) software
  is running on your network.

  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.


ARGUMENTS

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


OPTIONS

  - (hyphen alone)
                     Read   further   options   from  standard  input.    Signal
                     completion with -END.

  -AT                Specifies that  device  lives  on  the  AT-compatible  bus.
                     Version 3 option.

  -CALL_LIBRARY pathname
                     Specify pathname of the call  side  of  the  device  driver
                     library.  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 cleanup routine in the
                     call library.  Omitting the entry name deletes a previously
                     existing cleanup routine.

  -CSR_OFFSET port_number
                     Specify the  offset  into  the  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 (Control  Status
                     Register)  page  for  the  device in the bus address space.
                     The following information applies  to  the  particular  bus
                     structure implemented on your system:

                       o MULTIBUS:  optional

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

                       o AT-compatible bus:  If specified,  may indicate a range
                         (e.g., -csr_page 200 21F).  If the second  parameter is
                         missing,  a range  of  8 consecutive  bytes  is assumed
                         (e.g., "-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.  Version 3 option.

  -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.  Version 3 option.

  -END               Close the updated DDF and exit.

  -INITIALIZATION_ROUTINE entry_name
                     Specify  the entry point name of the initialization routine
                     in the call library.  Required.

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

  -INTERRUPT_ROUTINE level [entry_name]
                     Specify  a  level  at  which  the device interrupts and the
                     entry  point  name  of  an  optional   interrupt   routine.
                     Required.

  -MEMORY_BASE iova
                     Specify the MULTIBUS address  that  marks  the  base  of  a
                     controller's  local  memory.    If specified iova is < 64K,
                     this is Version 2 option; if > 64K, Version 3 option.

  -MEMORY_SIZE length
                     Specify  the size, in hexadecimal format, of the controller
                     memory.  If specified iova < 64K, this is Version 2 option;
                     if > 64K, 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|*}
                     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.  Required.

  -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_8]
                     Specify an  optional  revision  number  as  an  8-character
                     string.

  -SERIAL_NUMBER [string_16]
                     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  to  be  allocated  to  the
                     interrupt stack (default is 1024).

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

                       o MULTIBUS:  must be in range 0-5.

                       o VME bus:  must be in range 8-14.

                       o 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_64]
                     Specify up to 64 characters of  optional  user  information
                     (no embedded blanks).

  -VME               Specifies that device lives on VME bus.  Version 3 option.

  -20_BIT_ADDRESSING
                     Specify 20-bit memory address size of  controller.    (PBU2
                     calls must be used).


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
     $

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