CRDDF(1) Domain/OS SysV 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) or Small Computer System
Interface (SCSI) device for which you have written a driver. See Writing
Device Drivers with GPIO Calls for details on both DDFs and PBUs.
pathname (required)
Specifies name of the DDF to be created, modified, or
displayed.
OPTIONS
- Reads further options from standard input. Signal
completion with -end.
-at Specifies that the device lives on the AT-compatible bus.
Not valid with the -scsi option.
-bus bus_number (required for SCSI)
Specifies the SCSI bus number. Must be specified with
the -scsi option. Bus numbering starts at 0; therefore,
bus_number should always be 0 on a device with one SCSI
bus.
-call_library pathname (required for PBU)
Specifies pathname of the call side of the device driver
library. Not valid with the -scsi option.
-check Checks the DDF to ensure that all required fields have
been specified.
-cleanup_routine [entry_name]
Specifies the entry-point name of the clean-up routine in
the call library. Omitting the entry name deletes a
previously existing clean-up routine. Not valid with the
-scsi option.
-csr_offset port_number
Specifies the offset into the control status register
(CSR) page, in hexadecimal format, at which the device's
control/status registers are located. PBU Device drivers
may use this information during controller initialization.
Not valid with the -scsi option.
-csr_page iova vme_address_modifier (Required for PBU)
Specifies the hexadecimal address of the CSR page for the
device in the bus address space. Not valid with the -scsi
option. The following information applies to the
particular bus structure implemented on your system:
7 Multibus: optional
7 VME bus: optional. If specified, must be page-aligned
and in the range C000-D000. DDFs for devices on the
DN10000 may also include an optional VME address
modifier. If included, it must be set to either A16,
A24, or A32. This argument specifies the VME address
modifier placed on the bus during communication with the
device through the CSR pages only. Specifying the VME
address modifier results in a Version 5 ddf being
created.
7 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. Not valid with the -scsi option.
-display Displays the current contents of the DDF.
-dma_channel channel-number
Specifies to the driver the DMA channel number used by
AT-compatible device. Not valid with the -scsi option.
This is a Version 3 option.
-end Closes the updated DDF and exits.
-initialization_routine entry_name (required for PBU)
Specifies the entry-point name of the initialization
routine in the call library. Not valid with the -scsi
option.
-interrupt_library pathname
Specifies the pathname of the interrupt side of the device
driver library. Not valid with the -scsi option.
-interrupt_routine level [entry_name] (required for PBU)
Specifies a level at which the device interrupts and the
entry-point name of an optional interrupt routine. Not
valid with the -scsi option.
-major device_number
Specifies the DDF's major device number in range 0-31.
Cannot be specified with the -type option.
-minor device_number
Specifies the DDF's minor device number in range 0-511.
-memory_base iova
Specifies 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. Not valid with the
-scsi option.
-memory_size length
Specifies 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. Not valid with the -scsi option.
-multiple Specifies 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. Not valid with the -scsi option.
-node[f] {node number|*} (required for PBU)
Specifies 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. Not valid with the -scsi option.
-quit Exits without modifying the original DDF.
-replace Replaces (i.e., overwrite) an existing DDF with a new
version. To modify only selected portions of an existing
DDF, use -update.
-revision [string]
Specifies an optional revision number as an 8-character
string.
-scsi Specifies the DDF is for a SCSI device driver.
-serial_number [string]
Specifies an optional serial number as a 16-character
string.
-share Specifies a DDF for a controller that can be shared among
multiple processes.
-stack_size [decimal number]
Specifies the number of bytes, in decimal, to be allocated
to the interrupt stack (default is 1024).
-target target_id (required for SCSI)
Specifies the target_id of the SCSI device. Must be
specified with the -scsi option.
-type type name
Specifies the DDF's type. The type must already be
installed on the node. Cannot be specified with the
-major option.
-unit unit number (required for PBU)
Specifies the unit number of the device (must be equal to
the lowest interrupt level on which the device
interrupts). Not valid with the -scsi option.
7 MULTIBUS: Must be in range 0-5.
7 VME bus: Must be in range 8-14.
7 AT-compatible bus:
Must be in range 0-15.
-update Modifies 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]
Specifies up to 64 characters of optional user information
(no embedded blanks). Not valid with the -scsi option.
-vme Specifies that device lives on VME bus. Not valid with
the -scsi option. This is a Version 3 option.
-20_bit_addressing
Specifies 20-bit memory address size of controller. Not
valid with the -scsi option. The device driver must use
PBU2 calls if its DDF specifies this option.
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. 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
$
5. Create a DDF for a SCSI device driver:
$ crddf foo -scsi -
New DDF.
> -bus 0
> -target 0
> -end
$