
/* Configuration - (device configuration specifications)			*/

/*  MVS-Xinu Configuration File, in three sections				*/


/*  This file is processed by the config program, which produces 		*/

/*	conf.h		configuration header, recommended inclusion 		*/
/*			in all Xinu source code					*/
/*	conf.c		device switch table (devtab)				*/

/*  Config places the following definitions in conf.h:				*/
/*	NDEVS		the total number of devices in devtab			*/
/*	N<class>	the number of devices in class <class>			*/

/*  Note the configuration program only appears to support slash-star comments	*/
/*  for Section One and Section Two						*/


/*  ---------------------------------------------------------------------------	*/

/*  Section One defines device classes and device types				*/
/*  Each device instance within a class is assigned a minor device number,	*/
/*  starting at zero, used to distinguish between device instances		*/
/*  within the device class							*/

/*  The device classes are:							*/

/*	dgm	datagram master							*/
/*	dg	datagram connection						*/
/*	dsk	disk								*/
/*	eth	ethernet, used for MVS CTC adapter				*/
/*	kbmon	PC-Xinu, PC keyboard and monitor (display)			*/
/*	nam	namespace, name resolution 					*/
/*	oprcons	MVS-Xinu MVS master console (operator console)			*/
/*	oth	Othernet, presumably something like ethernet but different	*/
/*	rfm	remote filesystem master					*/
/*	rf	remote files							*/
/*	serial	serial devices							*/
/*	tcpm	TCP master, streams						*/
/*	tcp	TCP connection							*/
/*	tty	teletype, used for MVS console					*/

/*  The device types are:							*/

/*	BIOS		PC-Xinu PC BIOS, unused in MVS-Xinu			*/
/*	CTC		MVS-Xinu Channel To Channel adapter (IBM 3088)		*/
/*	ETH		PC-Xinu ethernet (unused in MVS-Xinu)			*/
/*	HARDWARE	?							*/
/*	MVSCONS		MVS-Xinu MVS master console				*/
/*	ULTRA		PC-Xinu (unused in MVS-Xinu)				*/
/*	WINDOW		currently unused in MVS-Xinu, fate undecided		*/

/*  For each device class, the default device drivers are as below		*/
/*  When a device driver is omitted, a default I/O error routine		*/
/*  ioerr() is provided; ioerr() returns SYSERR					*/
/*  Another device driver, ionull() is a placeholder for devices that do	*/
/*  not require any particular action for a specific device request;		*/
/*  ionull() returns OK								*/

/*	-i	init								*/
/*	-o	open								*/
/*	-c	close								*/
/*	-r	read								*/
/*	-w	write								*/
/*	-s	seek								*/
/*	-g	getc								*/
/*	-p	putc								*/
/*	-n	control								*/
/*	-iint	input interrupt driver						*/
/*	-oint	output interrupt driver						*/

/*  ---------------------------------------------------------------------------	*/


/*	MVS-Xinu device class definitions					*/


/* oprcons pseudo-device */
/* Reading from the MVS master console is currently disallowed; no code		*/
/* currently needs to perform that operation					*/
/* MVSCONS does not support Xinu windows					*/
oprcons:
	on MVSCONS	-i ionull	-o ionull	-c ionull
			-r ioerr	-w mvsconswrite	-s ioerr
			-n ionull	-g ioerr	-p ioerr
			-iint oprconsiin	-oint oprconsoin

/*  The CTC device initialization routine is null, so that we can		*/
/*  perform the actual device initialization after sufficient portions		*/
/*  of MVS-Xinu are up								*/
/*  The read and write routines will call CTC device initialization		*/
/*  as necessary (i.e., the first call)						*/

eth:
	on CTC		-i ctci_init	-o noopen	-c noclose
			-r ctci_read	-w ctci_write	-s noseek
			-n nocntl	-g nogetc	-p noputc
			-iint noiint	-oint nooint


/* Datagram interface to network (master device) */
dgm:
	on CTC		-i ionull	-o dgmopen	-c noclose 
			-r noread	-w nowrite	-s noseek
			-n dgmcntl	-g nogetc	-p noputc
			-iint noiint	-oint nooint	-csr 0
			-ivec 0		-ovec 0

/* A datagram "connection"  (pseudo-device returned by dgm open) */
dg:
	on CTC		-i dginit	-o noopen	-c dgclose
			-r dgread	-w dgwrite	-s noseek
			-n dgcntl	-g nogetc	-p noputc
			-iint noiint	-oint nooint	-csr 0
			-ivec 0		-ovec 0

/* Streams interface to network (master device) */
tcpm:
	on CTC		-i ionull	-o tcpmopen	-c noclose 
			-r noread	-w nowrite	-s noseek
			-n tcpmcntl	-g nogetc	-p noputc
			-iint noiint	-oint nooint	-csr 0
			-ivec 0		-ovec 0

/* A tcp "connection"  (pseudo-device returned by tcpm open) */
tcp:
	on CTC		-i tcpinit	-o noopen	-c tcpclose
			-r tcpread	-w tcpwrite	-s noseek
			-n tcpcntl	-g tcpgetc	-p tcpputc
			-iint noiint	-oint nooint	-csr 0
			-ivec 0		-ovec 0
%

/*  ---------------------------------------------------------------------------	*/

/*  Part Two provides device definitions and pseudo-devices			*/

/*  Having previously defined the device classes and device types, we now	*/
/*  define specific device instances						*/

/*  Each device instance states:						*/

/*	DEVICE			device name					*/
/*	is <class>		device class					*/
/*	on <type>		device type					*/

/*  The special device name GENERIC may be used to create pseudo-devices	*/
/*  whose names are not generally known by their device names.			*/
/*  An example of a pseudo-device would be a tty WINDOW, dynamically		*/
/*  allocated at runtime							*/

/*  Device type is only required when the device class can be associated	*/
/*  with more than one device type						*/

/*  Additionally the following parameters provide information not defined	*/
/*  in the device class:							*/

/*	name="<name>"		device name (printed)				*/
/*	ivec="<ivec>"		input interrupt vector address (PC-Xinu)	*/
/*	ovec="<ovec>"		output interrupt vector address (PC-Xinu)	*/
/*	port="<port>"		I/O port address (PC-Xinu)			*/

/*  Addresses may be specified in decimal, octal, C hexadecimal (0x),		*/
/*  or quoted strings specifying C preprocessor defines				*/
/*  Specifying C preprocessor defines requires the inclusion of the 		*/
/*  related header at the beginning of Section Two				*/

/*  Further, each device definition may provide overrides for device		*/
/*  driver specifications provided at the device class level			*/
/*  using the same syntax as Section One					*/
/*  Possible uses of this feature are to test new device driver code		*/
/*  prior to replacing the standard device driver				*/

/*  ---------------------------------------------------------------------------	*/


/*  MVS-Xinu device instance definitions					*/

/*	<device name> is <device class> on <device type>			*/


/*  MVS master console								*/

CONSOLE		is oprcons  	on MVSCONS

/* Physical ethernet raw packet interface; MVS-Xinu network interfaces		*/
/* Note nif[0] is always the loopback interface					*/

ETHER		is eth		on CTC
ETHER1		is eth		on CTC
ETHER2		is eth		on CTC

/* Datagram network interface (master pseudo-device)				*/

UDP		is dgm		on CTC

/* Pseudo-device slots for datagram "connections"				*/

DGRAM0		is dg		on CTC
DGRAM1		is dg		on CTC
DGRAM2		is dg		on CTC
DGRAM3		is dg		on CTC
DGRAM4		is dg		on CTC
DGRAM5		is dg		on CTC
DGRAM6		is dg		on CTC
DGRAM7		is dg		on CTC
DGRAM8		is dg		on CTC
DGRAM9		is dg		on CTC
DGRAMA		is dg		on CTC
DGRAMB		is dg		on CTC
DGRAMC		is dg		on CTC
DGRAMD		is dg		on CTC
DGRAME		is dg		on CTC
DGRAMF		is dg		on CTC

/* TCP network interface (master pseudo-device)					*/

TCP	is tcpm	on CTC

/* Pseudo-device slots for TCP "connections"					*/

TCP0		is tcp		on CTC
TCP1		is tcp		on CTC
TCP2		is tcp		on CTC
TCP3		is tcp		on CTC
TCP4		is tcp		on CTC
TCP5		is tcp		on CTC
TCP6		is tcp		on CTC
TCP7		is tcp		on CTC
TCP8		is tcp		on CTC
TCP9		is tcp		on CTC
TCPA		is tcp		on CTC
TCPB		is tcp		on CTC
TCPC		is tcp		on CTC
TCPD		is tcp		on CTC
TCPE		is tcp		on CTC
TCPF		is tcp		on CTC


%
//  ----------------------------------------------------------------------------

//  Section Three of the Configuration file, constant definitions

//------------------------------------------------------------------------------conf.h

/*------------------------------------------------------------------------------*/
/*  Fakeout Xinu environment by using Standard C headers	 		*/
/*------------------------------------------------------------------------------*/
#include <stdio.h>

#define MVS38J				// target platform
#define MVSPAGES	((1024+512)/4)	// # 4K pages of memory to allocate

#ifndef	LITTLE_ENDIAN
	#define	LITTLE_ENDIAN	0x1234
#endif
#ifndef	BIG_ENDIAN
	#define	BIG_ENDIAN	0x4321
#endif
#define	BYTE_ORDER	BIG_ENDIAN	// S/370 memory layout

#undef	MVS_LOCKMGR			// defined = call mvslock, mvsunlock

#define	MEMMARK				// memory marking supported
#define	RTCLOCK				// real time clock supported
#define	NPROC	    	50		// number of user processes
#define	NSEM	    	200		// number of semaphores
#undef	STKCHK				// resched ignores stack overflow
					// Systems/C expands stack as required

#define	SCHED_NO_PREEMPT		// MVS-Xinu doesn't preempt processes

#define DEFINE_EXTERN			// define externs for global data
					// (reserved for possible future
					// reentrancy considerations; doesn't
					// do much of anything at the moment)

//  Processes for sysinit() to start

#define	SYSINIT_INITDEVS		// init() devices
#define	SYSINIT_NULLDISP		// nulluser+process interface
#define	SYSINIT_NET			// network
#undef	SYSINIT_USER			// user process
#undef	SYSINIT_SAMPLE			// sample processes (debug process mgt)

//  Network features

#define	NET_FEATURE_GATEWAY	FALSE	// TRUE = host offers gateway services

//  Protocols for netstart() to start

#define	NETSTART_IP			// IP protocol
#define	NETSTART_ARP			// ARP protocol
#define	NETSTART_UDP			// UDP protocol

#undef	NETSTART_TCP			// TCP protocol
#undef	NETSTART_RIP			// RIP protocol
#undef	NETSTART_SNMP			// SNMP protocol
#undef	NETSTART_OSPF			// OSPF protocol

//  Daemons for netstart() to start

#undef	NETSTART_SLOWTIMER		// slowtimer table maintenance
#undef	NETSTART_RWHO			// rwho
#undef	NETSTART_FINGERD		// TCP finger
#undef	NETSTART_ECHOD			// TCP echo
#undef	NETSTART_UDPECHO		// UDP echo

#define	IP2NAME_FAKE			// <debug> net/ip2name option (no DNS)
#define	GETUTIM_FAKE			// <debug> arch/s370/clock/getutim 

//	#define BSDURG				/* TCP option 	 		*/

//	#define	ETDAEMON			/* Ethernet network daemon runs	*/
//	#define OSPF				/* define if using OSPF		*/
//	#define	SNMP				/* define for SNMP & MIB	*/
//	#define RIP				/* define if using RIP		*/
//	#define MULTICAST			/* define if using multicasting	*/

#ifdef	OSPF
#define	MULTICAST			/* OSPF uses multicasting	*/
#define	NAREA		1		/* max number of OSPF Areas	*/
#endif

#define	BSDBRC		0		// 1 = BSD broadcast (host all 0s)
					// 0 = normal (host all 1s)

#define	CONTACT   "mvs38j-ip@yahoogroups.com"	/* find out more about MVS-Xinu */
#define	LOCATION    	"Xinu Lab"		/* Host's physical location	*/
#define	IPADDR1		"192.168.200.1"		/* interface 1 IP address	*/
#define	DEFRTR		"192.168.200.2"		/* default router		*/
#define	TSERVER		"10.3.0.1:37"		/* Time server address		*/
#define	RSERVER		"10.3.0.1:2001"		/* Remote file server address	*/
#define	NSERVER		"10.3.0.1:53"		/* Domain Name server address	*/
#define	LOGHOST		"10.3.0.1:514"		/* syslog server address	*/

#define	BINGID		9		/* Othernet simlated net param. */

#define	SMALLMTU	400		/* for OTHER2; sim. small MTU	*/

#define	NBPOOLS		10		// max # buffer pool; mkpool
#define	BPMAXB		(20*1024)	/* max buffer size for mkpool	*/
#define BPMAXN		128		/* max # buffers in a buf pool	*/

#define	RT_BPSIZE	20		// # routes in route table <route.h>
					// remove to take <route.h> default 100

#define	TCPSBS		4096		/* TCP send buffer sizes	*/
#define	TCPRBS		8192		/* TCP receive buffer sizes	*/

#define	NPORTS		100		/* number of ports		*/

//  Clock management 
//  Time intervals are specified in hundredths of a second in int hhsec

#define	QUANTUM		10		// clock ticks until preemption
					// defclock.c, mvsclkinit.c

#define	TIMERGRAN	1		// tcptimer() timer granularity, secs/10

//  Define N<class> (number of devices in <class>) if config didn't already

#ifndef	Noth
#define	Noth		0		// zero "oth" class devices
#endif

#ifndef	Ndg
#define	Ndg		0		// zero "dg" class devices
#endif

//  Debugging defines

#define	PANIC_BUFPOOL			// defined = BUFPOOL_SYSERR will panic
#undef	MVS_DUMP_PROCSTATE		// defined = procstate() dumps pentry
#undef	MVS_GEN_CLOCKSTATE		// defined = generate clockstate()
#define	MVS_MAGIC_SVC		245	// SVC # mvsauth will use
#define	MVS_PANIC_ABCOD		809	// panic() abend code; undefined = exit(69)
#define	MVS_PROC_KEEP_FINI		// defined = preserve completed pentry
#define	MVS_PROC_KEEP_ENV		// defined = don't call mvsenv(ENVDESTROY,)
#undef	MVS_TRACE_LOCK			// defined = trace mvs[un]lock
#undef	MVS_TSO_TEST			// DOESN'T WORK, SVC97 problems
#define	MVS_XDONE_DEBUG "XDONE DEBUG"	// undefined = no xdone termination summary
					// defined = panic() checks msg
#define	MVS_WTO_GOV			// defined = kprintf calls mvsdoze
					// to limit MVS console message flooding
#define	MVS_SNAP_FUNCSTR		// defined = OK for snap to call funcstr;
					// should be undefined if you wish to 
					// call snap from funcstr to prevent
					// recursion, recursion, recursion....
//------------------------------------------------------------------------------conf.h




