325 lines
7.6 KiB
Groff
325 lines
7.6 KiB
Groff
.nr X
|
|
.if \nX=0 .ds x} master 4 "" "\&"
|
|
.TH \*(x}
|
|
.SH NAME
|
|
master \- master configuration database
|
|
.SH DESCRIPTION
|
|
The \f2master\f1
|
|
configuration database is a collection of files.
|
|
Each file contains configuration information for a device
|
|
or module that can be included in the system.
|
|
A file is named with the module name to which it applies.
|
|
This collection of files is maintained in a directory called
|
|
.IR /var/sysgen/master.d .
|
|
Each individual file has an identical format.
|
|
For convenience,
|
|
this collection of files is referred to as
|
|
the \f2master\f1 file,
|
|
as though it was a single file.
|
|
This allows a reference to the \f2master\f1 file to be
|
|
understood to mean the \f2individual file\f1 in the
|
|
\f2master.d\f1 directory that
|
|
corresponds to the name of a device or module.
|
|
.PP
|
|
The \f2master\f1 file is used by the \f2lboot\f1(1M)
|
|
program to obtain device information to generate the device driver
|
|
and configurable module files.
|
|
.I master
|
|
consists of two parts;
|
|
they are separated by a line with a dollar sign ($)
|
|
in column 1.
|
|
Part 1 contains device information for both hardware and software devices
|
|
and loadable modules.
|
|
Part 2 contains parameter declarations.
|
|
Any line with an asterisk (*) in column 1 is treated as a comment.
|
|
.SS Part 1, Description
|
|
Hardware devices,
|
|
software drivers,
|
|
and loadable modules
|
|
are defined with a line containing the following information.
|
|
Field 1 must begin in the leftmost position on the line.
|
|
Fields are separated by white space (tab or blank).
|
|
.PP
|
|
.TP 11
|
|
Field 1:
|
|
Element characteristics:
|
|
.RS
|
|
.PD 0
|
|
.TP 4
|
|
.B o
|
|
specify only once
|
|
.TP
|
|
.B r
|
|
required device
|
|
.TP
|
|
\f3b\fP
|
|
block device
|
|
.TP
|
|
\f3c\fP
|
|
character device
|
|
.TP
|
|
\f3t\fP
|
|
initialize cdevsw[].d_ttys
|
|
.TP
|
|
\f3j\fP
|
|
filesystem
|
|
.TP
|
|
\f3s\fP
|
|
software driver
|
|
.TP
|
|
\f3f\fP
|
|
STREAMS driver
|
|
.TP
|
|
\f3m\fP
|
|
STREAMS module
|
|
.TP
|
|
\f3x\fP
|
|
not a driver; a loadable module
|
|
.TP
|
|
\f3k\fP
|
|
kernel module
|
|
.TP
|
|
\f3u\fP
|
|
a stubs module that is loaded after all other normal modules
|
|
.TP
|
|
\f3n\fP
|
|
driver is fully semaphored for multi-processor operation;
|
|
the \f3n\f1 and \f3p\fP directives are ignored on
|
|
single-processor systems
|
|
.TP
|
|
\f3p\fP
|
|
driver is not semaphored and should run on only one processor
|
|
.TP
|
|
\f3w\fP
|
|
driver is prepared to perform any cache write back operation
|
|
required on write data passed via the strategy routine
|
|
.TP
|
|
\f3d\fP
|
|
dynamically loadable kernel module
|
|
.TP
|
|
\f3R\fP
|
|
auto-registrable dynamically loadable kernel module
|
|
.TP
|
|
\f3N\fP
|
|
don't allow auto-unload of dynamically loadable kernel module
|
|
.TP
|
|
\f3D\fP
|
|
load, then unload a dynamically loadable kernel module
|
|
.TP
|
|
\f3e\fP
|
|
ethernet driver
|
|
.RE
|
|
.PD
|
|
.TP
|
|
Field 2:
|
|
Handler prefix (14 characters
|
|
maximum).
|
|
.TP
|
|
Field 3:
|
|
Software driver external major number; a dash (\-) if not a software driver
|
|
or to be assigned during execution of \f2lboot\f1(1M).
|
|
Multiple
|
|
major numbers can be specified, separated by commas.
|
|
.TP
|
|
Field 4:
|
|
Number of sub-devices per device;
|
|
a dash (\-) if none.
|
|
.TP
|
|
Field 5:
|
|
Dependency list (optional);
|
|
this is a comma-separated list of other drivers or modules
|
|
that must be present in the
|
|
configuration if this module is to be included
|
|
.PP
|
|
For each module,
|
|
two classes of information are required by
|
|
.IR lboot (1M):
|
|
external routine references and variable definitions.
|
|
Routine lines begin with
|
|
white space and immediately follow the initial module specification line.
|
|
These lines are free form,
|
|
thus they can be continued arbitrarily between non-blank tokens as long
|
|
as the first character of a line is white space.
|
|
Variable definition lines begin after a line that contains a \f3\f1$
|
|
in column one.
|
|
Variable definitions follow C language conventions, with slight modifications.
|
|
.SS Part 1, Routine Reference Lines
|
|
If the IRIX system kernel or other dependent module contains
|
|
external references to a module,
|
|
but the module is not
|
|
configured,
|
|
these external references are undefined.
|
|
Therefore,
|
|
the
|
|
routine reference
|
|
lines are used to provide the information necessary to generate
|
|
appropriate dummy functions at boot time when the driver is not loaded.
|
|
.PP
|
|
Routine references
|
|
are defined as follows:
|
|
.TP 11
|
|
Field 1:
|
|
Routine name ()
|
|
.TP
|
|
Field 2:
|
|
The routine type; one of
|
|
.RS
|
|
.PD 0
|
|
.TP 12
|
|
.B {}
|
|
routine_name(){}
|
|
.TP
|
|
.B {nulldev}
|
|
routine_name(){nulldev();}
|
|
.TP
|
|
.B {nosys}
|
|
routine_name(){return nosys();}
|
|
.TP
|
|
.B {nodev}
|
|
routine_name(){return nodev();}
|
|
.TP
|
|
.B {false}
|
|
routine_name(){return 0;}
|
|
.TP
|
|
.B {true}
|
|
routine_name(){return 1;}
|
|
.TP
|
|
.B {fsnull}
|
|
routine_name(){return fsnull();}
|
|
.TP
|
|
.B {fsstray}
|
|
routine_name(){return fsstray();}
|
|
.TP
|
|
.B {nopkg}
|
|
routine_name(){nopkg();}
|
|
.TP
|
|
.B {noreach}
|
|
routine_name(){noreach();}
|
|
.RE
|
|
.PD
|
|
.SS Part 2, Variables
|
|
Variables
|
|
can be declared and (optionally) statically initialized
|
|
on lines after a line whose first character is a dollar sign ($).
|
|
Variable definitions follow standard C syntax for global declarations,
|
|
with the following inline substitutions:
|
|
.TP 6
|
|
##M
|
|
The internal major number assigned to the current module if it
|
|
is a device driver;
|
|
zero if this module is not a device driver.
|
|
.TP
|
|
##E
|
|
The external major number assigned to the current module;
|
|
either explicitly defined by the current master file entry,
|
|
or assigned by \f2lboot\f1(1M).
|
|
.TP
|
|
##C
|
|
The number of controllers present;
|
|
this number is determined dynamically by lboot(1M) for hardware devices,
|
|
or by the number provided in the system file for non-hardware drivers or modules.
|
|
.TP
|
|
##D
|
|
The number of devices per controller taken directly
|
|
from the current master file entry.
|
|
.SH EXAMPLES
|
|
A sample \f2master\f1
|
|
file for a shared memory module is named
|
|
\f2shm\f1.
|
|
The module is an optional loadable software module
|
|
that can only be specified once.
|
|
The module prefix is
|
|
.IR shm ,
|
|
and it has no major number associated with it.
|
|
In addition,
|
|
another module named \f2ipc\f1
|
|
is necessary for the correct operation of this module.
|
|
.Ex
|
|
*FLAG PREFIX SOFT #DEV DEPENDENCIES
|
|
ox shm \- \- ipc
|
|
shmsys(){nosys}
|
|
shmexec(){}
|
|
shmexit(){}
|
|
shmfork(){}
|
|
shmslp(){true}
|
|
shmtext(){}
|
|
$
|
|
#define SHMMAX 131072
|
|
#define SHMMIN 1
|
|
#define SHMMNI 100
|
|
#define SHMSEG 6
|
|
#define SHMALL 512
|
|
.sp .8v
|
|
struct shmid_ds shmem[SHMMNI];
|
|
struct shminfo shminfo = {
|
|
SHMMAX,
|
|
SHMMIN,
|
|
SHMMNI,
|
|
SHMSEG,
|
|
SHMALL,
|
|
};
|
|
.Ee
|
|
This \f2master\f1
|
|
file causes routines named \f2shmsys\f1, \f2shmexec\f1, and so on
|
|
to be generated by the boot program if the \f2shm\f1
|
|
driver is not loaded
|
|
and there is a reference to this routine from any other module loaded.
|
|
When the driver is loaded,
|
|
the structure array
|
|
.I shmem
|
|
is allocated, and the structure
|
|
.I shminfo
|
|
is allocated and initialized as specified.
|
|
.PP
|
|
A sample \f2master\f1
|
|
file for a
|
|
VME
|
|
disk driver is named
|
|
\f2dkip\f1.
|
|
The driver is a block and a character device,
|
|
the driver prefix is
|
|
.IR dkip ,
|
|
and the external major number is 4.
|
|
The
|
|
VME
|
|
interrupt priority level and vector numbers are
|
|
declared in the system file
|
|
.I /var/sysgen/system
|
|
(see \f2lboot\f1(1M)).
|
|
.Ex
|
|
*FLAG PREFIX SOFT #DEV DEPENDENCIES
|
|
bc dkip 4 \- io
|
|
.sp .8v
|
|
$$$
|
|
/* disk driver variable tables */
|
|
#include "sys/dvh.h"
|
|
#include "sys/dkipreg.h"
|
|
#include "sys/elog.h"
|
|
.sp .8v
|
|
struct iotime dkipiotime[##C][DKIPUPC]; /* io statistics */
|
|
struct iobuf dkipctab[##C]; /* controller queues */
|
|
struct iobuf dkiputab[##C][DKIPUPC]; /* drive queues */
|
|
int dkipmajor = ##E; /* external major # */
|
|
.Ee
|
|
This \f2master\f1
|
|
file causes entries in the block and character device switch
|
|
tables to be generated if this module is loaded.
|
|
Since this is a hardware device (implied by the block and character
|
|
flags),
|
|
VME
|
|
interrupt structures are also generated by
|
|
the boot program.
|
|
The declared arrays are all sized to the number of controllers
|
|
present, which is determined by the boot program based on information
|
|
in the system file
|
|
.IR /var/sysgen/system .
|
|
.SH FILES
|
|
.nf
|
|
/var/sysgen/master.d/*
|
|
/var/sysgen/system
|
|
.fi
|
|
.SH SEE ALSO
|
|
lboot(1M),
|
|
mload(4),
|
|
system(4).
|