This directory contains the modules which provide the kernel-level support
for RCI. This directory should be installed in /sys, alongside other
directories such as sys/os, etc. 

-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Important! -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

	You may not be able to use GNU make to build the Sun4 kernel,
	because /etc/config produces a kernel Makefile which uses a "+="
	contruction which GNU make does not know about. Use /bin/make
	instead, as in 

		/bin/make vmunix

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

We haven't really had tome to document these modules properly.
Some high level documentation exists for what we have done here;
check out the directory $RCCL/doc and look for "rcipaper.tex" and
"sunmods.tex", although the later refers to the work we did for
SunO/S 3.2 (which was much more involved than what we had to do
under SunO/S 4.1).

Most of the code here was written by Mike Parker, at McGill University.
A small amount was also written by John Lloyd.

A rough description of the files follows:

Makefile:
	build support software and apply static patches to a few kernel
	object files.

assym.s:
	Data structure definitions for assembly files.

cdefs.h:
	Some general definitions used by us in C programming.

crashinfo.h:
	Definitions for the CRASHINFO structure, used to return information to
	the main RCI program when an exception is encountered while running at
	the control level.

ctxlock.c:
ctxlock.h:
	Code and definitions used to specifically lock a process's context
	into the MMU. This is necessary so that we can quickly switch to this
	context at interrupt time.

genassym.c:
	Creates "assym.s"

genrci.c:
	The generic RCI psuedo-device. This is the primary interface between
	the RCI kernel support software and the application program. An RCI
	program will (at a low level, usually unseen by the programmer) open
	an RCI pseudo device and communicate with the kernel code by means of
	special ioctls().

kentucky.c:
kentucky_s.s:
	Code to actually perform a "kentucky" switch, which is where we take
	control of the CPU at interrupt time (using spl8()), quickly switch
	the memory context to that of the RCI program, run the RCI application
	functions, restore the original context, and release the CPU. Since
	the RCI application might use floating point, we also have to save and
	restore the context of the floating point unit.

kuser_traps.c:
kuser_traps.h:
	This code implements a wrapper that we place around the system trap
	code so that we can tolerate exceptions which occur while executing an
	RCI application function (otherwise, such exceptions would usually
	cause the kernel to crash).

link.h:
	Some generic macros for manipulating linked lists.

local.c:
local_s.s:
	Some general kernel-level support routines.

locore1.s:
	A file which is linked with the supplied version of locore.o in
	order to grow the interrupt stack. We grow the interrupt stack so that
	we can run RCI application functions on it.

mctlFix.c:
	A utility program which installs a patch to the supplied kernel object
	code so that the mlock() routines no longer require super-user
	privilege.

move.c:
	A utility routine to copy kernels from the build directory into /.

panic.c:
	A local version of "panic()~ (not normally used) which avoids trying
	to sync the disks before going down. This can be useful since many
	panics tend to hang while trying to do a sync.

patchsym.c:
	A utility program to patch object file symbol tables.

procx.c:
procx.h:
procx_s.s:
	Code and definitions to support "process extension", which 
	effectively extends the flags field of the process structure so that
	processes can be "marked" as using special utilities. RCI processes
	have to be marked so that proper cleanup routines can be called for
	them when the process exits.

rci.c:
rci.h:
rci_s.s:
	Main module for RCI kernel support code.

rci_template.c:
	A template RCI device driver.

rciinfo:
	A "adb" macro for printing our the contents of the RCIINFO structure,
	used by the kernel level RCI code.

rciioctl.h
	Defines the ioctls used to communicate between the RCI kernel code and
	the application process.

sparc_crash.h:
	Machine specific definition of the CRASHINFO structure for SPARC
	machines.

spl.h:
	Redefines splhigh() to spl8(). Hmph!

xyclk.c:
xyclkreg.h:
	Driver for the XYCOM XVME 203 real-time clock, which, if installed,
	provides RCI with a faster timer interval and a high precision
	wall clock.

xyd.c:
xydreg.h:
	RCI interface driver for the XYCOM XVME 240 parallel port.



