master(4) CLIX master(4)
NAME
master - Master configuration database
DESCRIPTION
The master configuration database is a collection of files that contain
configuration information for devices and modules included in the system.
This collection of files is contained in several directories. The default
directories are /usr/src/uts/clipper/master.d/machine, where machine is
the name of the machine for which the files apply. A file is named with
the module name to which it applies.
The files are used by two programs. Consequently, there are two sets of
directives contained in the files. One program is mkconfig, which uses
the files to generate a configuration file. The other is sysconfig, which
obtains configuration data used to allow the configuration and values in
the files to be changed.
The set of directives understood by mkconfig are as follows:
$[[-]name1 [&& [-]name2]] :
$[[-]name1 [|| [-]name2]] :
Names a section of a file. The named section begins on the line
after the directive and ends either at the end of the current file,
or before another named section or macro begins. The null section
name $: may also be used to end a named section. Named sections
may not be nested. A named section with its name prepended with
the minus sign (-) is output only if file name is not in the
argument list. A named section with a logical OR (||) or AND (&&)
of another named section is output only if the logical condition
results in a TRUE value. A section with the special name _end is
output only after the last of any generated configuration tables.
$name([arg1, arg2, ... argn]):
Defines a simple macro with optional arguments. A macro definition
is ended in the same manner as a named section. A macro is much
like a named section except that it is output only if it is invoked
by a MACRO directive or appears in the model specifier of the
VECTOR directive. Any occurrence of the argument strings in the
body of the macro are replaced by the argument strings of the
invoking instance of the macro. Macro bodies may not contain macro
references or new macro definitions.
$MACRO macroname(arg1, arg2, ... argn)
Invokes a defined macro. The argument count must match the
argument count of the defined macro. The body of the macro is
output with invoking arguments substituted for defined arguments.
$name section
Writes section to the output file if the file name is present in
2/94 - Intergraph Corporation 1
master(4) CLIX master(4)
the argument list and it contains a section segment.
$* section
Copies files if any files in the argument list contain a named
section.
$DEVICE [b|c|s]major=n|n-m prefix=string
$DEVICE [b|c|s]major=n|n-m identifier=name ...
Adds an entry to a device table. The cmajor directive specifies
the cdevsw table, smajor specifies the sdevsw table, and bmajor
specifies the bdevsw table. The major number for smajor must be a
single number. The major number for cmajor and bmajor can be a
single number or a span of major numbers, such as 0-7. The prefix
directive takes a string as an argument and is used to form the
standard names for the switch table entries. For nonstandard
names, the device directive can explicitly specify each entry in
the cdevsw or bdevsw table.
After the major number is specified, the remainder of the line may
have identifiers followed by = and the nonstandard name. The valid
cmajor identifiers are open, close, read, write, ioctl, tty, and
stream. The only valid smajor identifier is stream. The valid
bmajor identifiers are open, close, strategy, and print. More than
one DEVICE line may exist for the same major slot as long as
specific table entries are not redefined.
$TTY_DEVICE cmajor=n|n-m prefix=string
$TTY_DEVICE cmajor=n|n-m identifier=name ...
Identical to the DEVICE directive, but allows automatic generation
of the tty field for terminal devices.
$XIO_DEVICE xmajor=n|n-m prefix=string
$XIO_DEVICE xmajor=n|n-m identifier=name ...
Identical to the DEVICE directive, but adds the entry to the xdevsw
table. The valid xmajor identifiers are init, start, finish, exit,
exec, and fork.
$STREAM_DEVICE cmajor=n|n-m prefix=string
$STREAM_DEVICE smajor=n prefix=string
Identical to the DEVICE directive, but allows automatic generation
of the stream field for stream devices.
$STREAM_MODULE name=string1 module=string2
Identical to the $DEVICE directive, but adds entries to the
fmodsw[] array.
$FILESYSTEM prefix=s1 flags=s2 pipe=s3 name=s4 notify=s5
Adds an entry to the file system switch table fstypsw[] and a
corresponding entry to the fsinfo[] table. The arguments are taken
as strings and are inserted in the tables as is. The prefix
directive is used to form the prefixes to the standard entry points
2 Intergraph Corporation - 2/94
master(4) CLIX master(4)
in the fstypsw[] table.
$VECTOR model=macro(arg1, ... , argn) service=name vector=g,l ssw=val
Specifies the interrupt service linkages for a given vector. The
model directive names a macro and its optional arguments to be used
in generating the assembly language stub that calls the kernel
interrupt service routine. The service directive specifies the
name of the address that will be written into the actual interrupt
vector. The service routine name is typically generated by the
macro specified by the model directive. The vector directive may
be specified as group,level or as a single address specifying the
physical address of the interrupt vector. Vector addresses are
understood to be hexadecimal when preceded with a leading 0x. The
ssw directive is the value that specifies the new value of the
System Status Word (SSW) for the specified vector. The val
argument must be a decimal or hexadecimal constant or the name of a
constant defined earlier as by the C preprocessor.
$FAMILY code=family-code bname=board-name probe=routine
Specifies the startup routine for a given Shared Resource (SR) Bus
board. The code directive provides the family code number of the
board and must be given in hexadecimal format. The bname directive
specifies the name of the board. The name may be more than one
word and is delimited by the probe keyword. The probe directive is
the routine that will be called to initialize the board.
$LOAD name=s1 [init=s2] objects=s3[(s4[,s5])] ...
Identifies the code that will be loaded in memory upon demand. The
name directive takes a string as an argument and is used to name
the section of memory that will be reserved. The init directive
takes as an argument the name of the initialization routine that
will be executed immediately after the code is loaded into memory.
The objects directive specifies the object files that will be
loaded. An entire library may be specified by the name of the
library. If only certain objects in a library are needed, they are
specified by a comma-separated list enclosed in parentheses
following the library name. The list may not contain white space.
There must be a separate objects identifier for each library
referenced. The objects identifiers may be separated by either
spaces or tabs.
The set of directives understood by sysconfig are as follows:
*$CONFIG [category $IN[(class)]|$OUT|$NOLIST] [$ADVANCED]
*$CONFIG [$NOLIST] [$ADVANCED]
Identifies the file as a configuration file. It must be the first
line in the file. If it is not found, the file is ignored.
If category is specified, all parameters in the file are grouped
together and given a name that is the same as the filename. This
group is then placed in the menu category category. If no category
2/94 - Intergraph Corporation 3
master(4) CLIX master(4)
is specified, the categories in the $PAR directives are used. If
category contains any spaces, t must be enclosed within single or
double quotation marks.
The $IN[(class)] argument specifies that the default is to include
the file when a system is made. If the optional argument class is
given, then only include the file if class is defined in the
master.d/config file for the current machine type. class is a
comma-separated list of class names if more than one class is
desired.
The $OUT argument specifies that the default is not to include the
file when a system is made.
The $NOLIST argument specifies that the file is never to be
included when a system is made.
If the line *$CONFIG or the line *$CONFIG $ADVANCED is used, the
file will always be included.
The $ADVANCED argument specifies that the file and any parameters
in it have an advanced nature.
Up to three lines of descriptive help, each 80 characters long, may
be included. The help lines must immediately follow the $CONFIG
directive and have an asterisk (*) as the first character. To mark
the end of the *$CONFIG help lines, the following line must
immediately follow the help lines:
*$$
*$PAR[(class)] [category] default [$ADVANCED]
The $PAR directive identifies a #define parameter as being tunable.
It must be immediately followed by up to three descriptive help
lines, and then by the #define statement.
The category argument specifies the category that the parameter
should be placed under. This category will be the default for all
following $PAR directives until another category is specified. If
a category was specified in the $CONFIG directive, the $PAR
category option is ignored. If neither the $CONFIG directive nor
any $PAR directives specify a category, the category defaults to
the name of the file. If category contains any spaces, it must be
enclosed within single or double quotation marks.
The default argument is the default value of the parameter. If it
contains any spaces, it must be enclosed within single or double
quotation marks.
The $ADVANCED argument specifies that the parameter has an advanced
4 Intergraph Corporation - 2/94
master(4) CLIX master(4)
nature. If the $ADVANCED option is included in the $CONFIG
directive, all parameters in the file automatically default to
advanced.
If the optional argument class is given, then use the default
argument if class is defined in the master.d/config file for the
current machine type. There must be a separate $PAR line for each
class used, with the default $PAR line following on a sepatate line
below. If a class is used, then the #define statement must appear
enclosed in an #ifdef construct with the class as the expression.
If more than one class is desired, then the #ifdef statements must
be nested in the #else condition.
EXAMPLES
This is a sample file showing the use of some of the directives for both
mkconfig and sysconfig.
*$CONFIG "Inter-process Communication" $IN $ADVANCED
*The XYZ terminal driver. The /dev entries associated
*with this driver are /dev/ttxyz??.
*$$
$includes:
#include "sys/xio/xyz.h"
$defines:
*$PAR 20
*The total number of xyz terminals available on the system.
#define NXYZ 20
$code:
int nxyz = NXYZ;
struct tty xyz_tty [NXYZ];
struct xyzproc xyzproc [NXYZ];
$TTY_DEVICE cmajor=25 prefix=xyz
$XIO_DEVICE xmajor=2 start=xyz_start finish=xyz_finish
$FAMILY code=0x2a bname=XYZ Communication Board probe=xyz_probe
$LOAD name=xyz init=xyz_init objects=../lib.io(xyz.o)
FILES
/usr/src/uts/clipper/master.d/machine/* Configurable kernel files.
RELATED INFORMATION
2/94 - Intergraph Corporation 5
master(4) CLIX master(4)
Commands: mkconfig(8), sysconfig(8)
6 Intergraph Corporation - 2/94