*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> master (4)              
Title
Content
Arch
Section
 

Contents


master(4)							     master(4)


NAME    [Toc]    [Back]

     master - master configuration database

DESCRIPTION    [Toc]    [Back]

     The master	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
     /var/sysgen/master.d.  Each individual file has an	identical format.  For
     convenience, this collection of files is referred to as the master	file,
     as	though it was a	single file.  This allows a reference to the master
     file to be	understood to mean the individual file in the master.d
     directory that corresponds	to the name of a device	or module.

     The master	file is	used by	the lboot(1M) program to obtain	device
     information to generate the device	driver and configurable	module files.
     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.

   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).

     Field 1:	Element	characteristics:
		o   specify only once
		r   required device
		b   block device
		c   character device
		t   initialize cdevsw[].d_ttys
		j   filesystem
		s   software driver
		f   STREAMS driver
		m   STREAMS module
		x   not	a driver; a loadable module
		k   kernel module
		u   a stubs module that	is loaded after	all other normal
		    modules
		n   driver is fully semaphored for multi-processor operation;
		    the	n and p	directives are ignored on single-processor
		    systems
		p   driver is not semaphored and should	run on only one
		    processor
		w   driver is prepared to perform any cache write back
		    operation required on write	data passed via	the strategy
		    routine





									Page 1






master(4)							     master(4)



		d   dynamically	loadable kernel	module
		R   auto-registrable dynamically loadable kernel module
		N   don't allow	auto-unload of dynamically loadable kernel
		    module
		D   load, then unload a	dynamically loadable kernel module
		e   ethernet driver

     Field 2:	Handler	prefix (14 characters maximum).

     Field 3:	Software driver	external major number; a dash (-) if not a
		software driver	or to be assigned during execution of
		lboot(1M).  Multiple major numbers can be specified, separated
		by commas.

     Field 4:	Number of sub-devices per device; a dash (-) if	none.

     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

     For each module, two classes of information are required by 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 $ in column one.  Variable definitions
     follow C language conventions, with slight	modifications.

   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.

     Routine references	are defined as follows:

     Field 1:	Routine	name ()

     Field 2:	The routine type; one of
		{}	    routine_name(){}
		{nulldev}   routine_name(){nulldev();}
		{nosys}	    routine_name(){return nosys();}
		{nodev}	    routine_name(){return nodev();}
		{false}	    routine_name(){return 0;}
		{true}	    routine_name(){return 1;}
		{fsnull}    routine_name(){return fsnull();}
		{fsstray}   routine_name(){return fsstray();}
		{nopkg}	    routine_name(){nopkg();}





									Page 2






master(4)							     master(4)



		{noreach}   routine_name(){noreach();}

   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:

     ##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.

     ##E   The external	major number assigned to the current module; either
	   explicitly defined by the current master file entry,	or assigned by
	   lboot(1M).

     ##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.

     ##D   The number of devices per controller	taken directly from the
	   current master file entry.

EXAMPLES    [Toc]    [Back]

     A sample master file for a	shared memory module is	named shm.  The	module
     is	an optional loadable software module that can only be specified	once.
     The module	prefix is shm, and it has no major number associated with it.
     In	addition, another module named ipc is necessary	for the	correct
     operation of this module.

	  *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

	  struct shmid_ds shmem[SHMMNI];
	  struct shminfo shminfo = {
	       SHMMAX,
	       SHMMIN,
	       SHMMNI,
	       SHMSEG,
	       SHMALL,
	  };



									Page 3






master(4)							     master(4)



     This master file causes routines named shmsys, shmexec, and so on to be
     generated by the boot program if the shm 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 shmem is allocated, and the
     structure shminfo is allocated and	initialized as specified.

     A sample master file for a	VME disk driver	is named dkip.	The driver is
     a block and a character device, the driver	prefix is dkip,	and the
     external major number is 4.  The VME interrupt priority level and vector
     numbers are declared in the system	file /var/sysgen/system	(see
     lboot(1M)).

	  *FLAG	PREFIX SOFT #DEV DEPENDENCIES
	  bc	dkip   4    -	 io

	  $$$
	  /* disk driver variable tables */
	  #include "sys/dvh.h"
	  #include "sys/dkipreg.h"
	  #include "sys/elog.h"

	  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 # */

     This master 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
     /var/sysgen/system.

FILES    [Toc]    [Back]

     /var/sysgen/master.d/*
     /var/sysgen/system

SEE ALSO    [Toc]    [Back]

      
      
     lboot(1M),	mload(4), system(4).


									PPPPaaaaggggeeee 4444
[ Back ]
 Similar pages
Name OS Title
peer_snmpd_config IRIX SNMP master agent configuration
gettytab OpenBSD terminal configuration database
netconfig IRIX network configuration database
netconfig HP-UX network configuration database
endnetconfig NetBSD get network configuration database entry
nc_sperror NetBSD get network configuration database entry
getnetconfig NetBSD get network configuration database entry
sysconfigdb Tru64 Manage the subsystem configuration database
setnetconfig NetBSD get network configuration database entry
getnetconfig IRIX get network configuration database entry
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service