**************************************************************************
* Copyright 1990-1992, Silicon Graphics, Inc. 
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or 
* duplicated in any form, in whole or in part, without the prior written 
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions 
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or 
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - 
* rights reserved under the Copyright Laws of the United States.
**************************************************************************
*
*#ident	"$Revision: 3.187 $
*
* KERNEL
*
*FLAG	PREFIX	SOFT	#DEV	DEPENDENCIES
k	-	 -	  -
	
$$$

/*	kernel:	*/
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/driver.h>
#include <sys/edt.h>
#include <sys/vmereg.h>
#include <sys/sema.h>
#include <sys/dvh.h>
#include <sys/elog.h>
#include <sys/fstyp.h>
#include <sys/iobuf.h>
#include <sys/log.h>
#include <sys/map.h>
#include <sys/param.h>
#include <sys/pda.h>
#include <sys/sbd.h>
#include <sys/strmp.h>
#include <sys/strsubr.h>
#include <sys/sysmacros.h>
#include <sys/time.h>
#include <sys/tuneable.h>
#include <sys/utsname.h>
#include <sys/vfs.h>
#include "bwhen.h"

/*
 * Root filesystem type.  This array can be initialized to a valid
 * filesystem type name to force root to a particular fstype.
 */
char rootfstype[FSTYPSZ] = "";


/*
 * These are used to initialize the utsname struct
 */
char	uname_release[] = BWHEN_REL;
char	uname_releasename[] = BWHEN_RELNAME;
char	uname_version[] = BWHEN_VER;

#if R4000 && JUMP_WAR
/*
 * Enables a workaround for a bug in early Revisions of the R4000.
 * This bug exists in at least Rev 2.2 and before.  
 */

/* Attempt to correct jumps at the end of pages. */
int R4000_jump_war_correct = 0;

/* Attempt to correct divides at end of pages. This is
 * on for all 2.2SC and 3.0SC parts, since that bug exists
 * in those revisions.
 */
int R4000_div_eop_correct = 0;

/* Warn the user and log in SYSLOG, if unable to correct */
int R4000_jump_war_warn = 1;

/* Kill the process if unable to correct. */
int R4000_jump_war_kill = 1;

/* Handle ANY jump/branch at the end of a page as a problem */
int R4000_jump_war_always = 0;

#ifdef _R5000_JUMP_WAR
int R5000_jump_war_correct = 0;
#endif /* _R5000_JUMP_WAR */
#endif

#ifdef IP21
int ip21_bbcc_gfx = 0;
#endif

#if TFP
/* Reject non-shared a.out's that have the OHW_R8KPFETCH flag
 * set in int PT_OPTIONS section of the elf program header.
 */
int chk_ohw_r8kpfetch = 1;
#endif

#if ! R4000
int R4000_badva_war = 0;
#else
int R4000_badva_war = 1;
#endif

#ifdef _R5000_CVT_WAR
int R5000_cvt_war = _R5000_CVT_WAR;
#endif /* _R5000_CVT_WAR */

/* Setup the miniroot variable for kernel miniroot configuration */
#ifdef MINIROOT
u_char miniroot = 1;
#else
u_char miniroot = 0;
#endif

uint defaultsemameter = DEFAULTSEMAMETER;

extern int nopkg(void);
extern void noreach(void);
