'\"macro stdmacro
.if n .pH g1a.edittbl @(#)edittbl	40.9
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} edittbl 1M "Essential Utilities" "\&"
.if \nX=1 .ds x} edittbl 1M "Essential Utilities"
.if \nX=2 .ds x} edittbl 1M "" "\&"
.if \nX=3 .ds x} edittbl "" "" "\&"
.TH \*(x}
.SH NAME
\f4edittbl\f1 \- edit edt_data file
.SH SYNOPSIS
\f4/usr/sbin/edittbl\f1
\f4\-d\f1
|\f4\-s\f1
{\f4\-g\f1
|\f4\-i\f1
|\f4\-l\f1
|\f4\-r\f1}
[\f4\-t\f1]
.RI [ file ]
.P
\f4/usr/sbin/edittbl\f1
\f4\-B\f1
.I bus_type 
{\f4\-g\f1
|\f4\-i\f1
|\f4\-l\f1
|\f4\-r\f1}
[\f4\-t\f1]
.RI [ file ]
.SH DESCRIPTION
The \f4edittbl\f1 command is a user-level utility that permits changes to
\f4edt_data\f1 files.
These files are used by firmware programs (see \f4firmware\f1(8))
during construction of the Equipped Device Table (EDT).
.P
Note that only one of the \f4\-g\f1, \f4\-i\f1, \f4\-l\f1, and \f4\-r\f1
options may be specified in either of the forms shown above.
.P
\f4edittbl\f1 prints the option list when no arguments are specified.
The options and arguments are:
.TP
\f4\-d\f1
Selects the device look-up table for the system bus.
This option cannot be used with the \f4\-B\f1 option.
.TP
\f4\-s\f1
Selects the sub-device look-up table for the system bus.
This option cannot be used with the \f4\-B\f1 option.
.TP
\f4\-g\f1
Generates the default entries for the selected look-up table(s).
This overwrites any entries that are currently in the selected
look-up table(s).
For the device table, these base entries are SBD and PORTS.
For the subdevice table, 
they are NULL, FD5, HD10, HD30,
HD72, HD72A, HD72B, HD72C, HD43,
and HD72D.
.TP
\f4\-i\f1
Specifies that new entries are to be added to the selected table(s).
The ID codes for table entries and the input are
compared; only new codes are installed.
The formats for entries are described below. 
An EOF or ``.'' ends the data input.
.TP
\f4\-l\f1
Specifies that the selected table(s) are to be listed.
.TP
\f4\-r\f1
Specifies that entries are
to be removed from either table.
The ID codes of the table are compared to the input;
entries with codes that match the input are removed. 
The format is identical to that for the \f4\-i\f1 option and is listed below.
An EOF or ``.'' ends the data input.
.TP
\f4\-t\f1
Suppresses the program headings and user prompts; warnings and errors
are not affected.
This option is primarily useful in installation and removal scripts.
.TP
\f4\-B\f1
Specifies that the \f4edt_data\f1 file for \f2bus_type\f1 is to be
edited.  Currently the only bus type supported is \f4scsi\f1.
If this option is not specified, the system bus
\f4edt_data\f1 file will be edited.
.TP
.I file
The user may specify a target path name for the utilities.
The default for the \f4\-d\f1 and \f4\-s\f1 options is \f4./edt_data\f1.
For the \f4\-B\f1 option and the \f4scsi\f1 bus type,
\f2file\f1 is where the target controller information is to be
placed;  the default for the \f4\-B scsi\f1 option is
\f4/edt/SCSI/edt_data\f1.
.SH INPUT FORMAT
Data for installation/removal is entered as hex format numbers or character
strings, one line for each table entry.
The data fields must be supplied in the sequence described below.
.SS Devices
.tr ~
.sp .5
.TP 15
\f4ID_code\f1
Number between 0x0 and 0xffff
that a device uses to identify itself.
For extended devices (such as SCSI), add 0x10000 to the ID_code.
ID codes are administered by AT&T.
.TP
\f4name\f1
Field name for a device.
Device names are administered by AT&T.
This string is also the file name that DGMON loads to diagnose a device.
.TP
\f4rq_size\f1
Number between 0x0 and 0xff
for the count of entries in a device's job request queue.
.TP
\f4cq_size\f1
Number between 0x0 and 0xff
for the count of entries in a device's job completion queue.
.TP
\f4boot_device\f1
Determines whether a device may be used to boot programs.
A ``1'' means that it is bootable; a ``0'' means that it is not.
.TP
\f4word_size\f1
Shows the word size of a device I/O bus.
A ``1'' is used for devices with a 16 bit bus word; a ``0'' is used for devices with an 8 bit bus word.
.TP
\f4brd_size\f1
Specifies the I/O connector slots that a device requires.
A ``1'' indicates that two slots are needed, while a ``0'' means that one is required.
.TP
\f4smart_board\f1
Determines whether a device is intelligent, i.e., requires downloaded code for
normal operation or supports subdevices.
A ``1'' indicates an intelligent device; a ``0'' specifies a ``dumb'' device.
.TP
\f4cons_cap\f1
Shows whether a device can support the system console terminal.
A ``1'' is used for devices that can, a ``0'' for those that cannot.
.TP
\f4cons_file\f1
Shows whether a device needs downloaded code to support the console
interface when \f4cons_cap\f1 has a value of "1".  A "0" in this field
means that the device can support a system console terminal with
PROM-based code.  A "1" in this field means downloaded code is needed.
\f4cons_file\f1 must have the value of "0" when \f4cons_cap\f1 is "0".
.SS Subdevices
.sp 5
.TP 15
\f4ID_code\f1
Number between 0x0 and 0xffff
for the code that identifies a subdevice.
Subdevice ID codes are administered by AT&T.
.TP
\f4subdev_name\f1
String (maximum of 9 characters) for a subdevice name.
Subdevice names are administered by AT&T.
.TP
\f4dev_name\f1
String (maximum of 9 characters) for the device name
with which the subdevice is associated.
.bp
.SH EXAMPLES
Generate and list the base entries for both the device and subdevice
tables, saving the results in \f4./edt_data\f1.
.PP
.RS
\f4edittbl \-g \-l \-s \-d\f1
.RE
.PP
Install subdevice entries with new ID codes
from the file \f4subdev.in\f1 into the existing file \f4./edt_data\f1.
.PP
.RS
\f4edittbl \-i \-s < subdev.in\f1
.RE
.PP
List the device table entries found in \f4/dgn/edt_data\fP
.PP
.RS
\f4edittbl \-l \-d /dgn/edt_data\f1
.RE
.SH FILES
\f4/dgn/edt_data\fP
.br
\f4/edt/SCSI/edt_data\fP
.br
\f4/etc/scsi/edittbl\fP
.Ee
