⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 locore.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
/* 	@(#)Locore.c	4.1	(ULTRIX)	7/2/90 *//************************************************************************ *									* *			Copyright (c) 1988 by				* *		Digital Equipment Corporation, Maynard, MA		* *			All rights reserved.				* *									* *   This software is furnished under a license and may be used and	* *   copied  only  in accordance with the terms of such license and	* *   with the  inclusion  of  the  above  copyright  notice.   This	* *   software  or  any  other copies thereof may not be provided or	* *   otherwise made available to any other person.  No title to and	* *   ownership of the software is hereby transferred.			* *									* *   This software is  derived  from  software  received  from  the	* *   University    of   California,   Berkeley,   and   from   Bell	* *   Laboratories.  Use, duplication, or disclosure is  subject  to	* *   restrictions  under  license  agreements  with  University  of	* *   California and with AT&T.						* *									* *   The information in this software is subject to change  without	* *   notice  and should not be construed as a commitment by Digital	* *   Equipment Corporation.						* *									* *   Digital assumes no responsibility for the use  or  reliability	* *   of its software on equipment which is not supplied by Digital.	* *									* ************************************************************************ * Modification History: * * 28 Jan 88 -- us *	Change to maps - associated with new allocator. Removed * 	all references to camap and mbufs. * 21 Jan 88 -- jmartin *	Replace calls to the (inline) functions clearseg and copyseg *	respectively with blkclr (or bzero) and blkcpy (or bcopy). *	Establish a window in process memory through which a parent *	can write to (and read from) the memory of the child.  This *	window is UPAGES*NBPG bytes located between the u-area and the *	user stack.  Remove the following entities: CMAP1, CADDR1, *	CMAP2, CADDR2, Vfmap, vfutl, clearseg, copyseg.  Redefine *	Forkmap and forkutl.  Change the computation for the location *	of USRSTACK and the size of the process page table. * ***********************************************************************/#include "dz.h"#include "mba.h"#include "uba.h"#include "../machine/pte.h"#include "../h/param.h"#include "../h/systm.h"#include "../h/dir.h"#include "../h/user.h"#include "../h/vm.h"#include "../h/tty.h"#include "../h/proc.h"#include "../h/buf.h"#include "../h/msgbuf.h"#include "../h/mbuf.h"#include "../h/protosw.h"#include "../h/domain.h"#include "../vax/clock.h"#include "../vax/nexus.h"#include "../io/uba/ubavar.h"#include "../io/uba/ubareg.h"/* * Pseudo file for lint to show what is used/defined in locore.s. */struct	scb scb;int	(*UNIvec[128])();#if NUBA > 1int	(*UNI1vec[128])();#endifstruct	rpb rpb;int	intstack[3*128];int	masterpaddr;		/* p_addr of current process on master cpu */struct	user u;doadump() { dumpsys(); }Xmba3int() { }Xmba2int() { }Xmba1int() { }Xmba0int() { }lowinit(){	extern int dumpmag;	extern struct domain unixdomain;#ifdef INET	extern struct domain inetdomain;#endif#include "imp.h"#if NIMP > 0	extern struct domain impdomain;#endif	/* cpp messes these up for lint so put them here */	unixdomain.dom_next = domains;	domains = &unixdomain;#ifdef INET	inetdomain.dom_next = domains;	domains = &inetdomain;#endif#if NIMP > 0	impdomain.dom_next = domains;	domains = &impdomain;#endif	dumpmag = 0;			/* used only by savecore */	/*	 * Pseudo-uses of globals.	 */	lowinit();	intstack[0] = intstack[1];	rpb = rpb;	scb = scb;	maxmem = physmem = freemem = 0;	u = u;	main(0);	Xustray();	/*	 * Routines called from interrupt vectors.	 */	panic("Machine check");	printf("Write timeout");	(*UNIvec[0])();#if NUBA > 1	(*UNI1vec[0])();#endif	ubaerror(0, (struct uba_hd *)0, 0, 0, (struct uba_regs *)0);	cnrint(0);	cnxint(0);	consdin();	consdout();#if NDZ > 0	dzdma();#endif#if VAX8200	rx5_intr();#endif#if NMBA > 0	mbintr(0);#endif	hardclock((caddr_t)0, 0);	softclock((caddr_t)0, 0);	trap(0, 0, (unsigned)0, 0, 0);	syscall(0, 0, (unsigned)0, 0, 0);	ipintr();	rawintr();	if (vmemall((struct pte *)0, 0, (struct proc *)0, 0))		return;		/* use value */	machinecheck((caddr_t)0);	memerr();	boothowto = 0;}consdin() { }consdout() { }#if NDZ > 0dzdma() { dzxint((struct tty *)0); }#endifint	catcher[256];int	cold = 1;Xustray() { }struct	pte Sysmap[6*NPTEPG];char	Sysbase[6*NPTEPG*NBPG];int	umbabeg;struct	pte Nexmap[16][16];struct	nexus nexus[MAXNNEXUS];struct	pte UMEMmap[NUBA][512];struct	pte QMEMmap[17][512];char	umem[NUBA][512*NBPG];char	qmem[17][512*NBPG];int	umbaend;struct	pte Usrptmap[USRPTSIZE];struct	pte usrpt[USRPTSIZE*NPTEPG];struct	pte Forkmap[UPAGES];struct	user forkutl;struct	pte Xswapmap[UPAGES];struct	user xswaputl;struct	pte Xswap2map[UPAGES];struct	user xswap2utl;struct	pte Swapmap[UPAGES];struct	user swaputl;struct	pte Pushmap[UPAGES];struct	user pushutl;struct	pte mmap[1];char	vmmap[NBPG];struct	pte Mbmap[NMBCLUSTERS/CLSIZE];struct  pte V8200wmap;struct  pte V8200rmap;struct  pte V8200pmap;struct	pte msgbufmap[CLSIZE];struct	msgbuf msgbuf;/*ARGSUSED*/badaddr(addr, len) caddr_t addr; int len; { return (0); }/*ARGSUSED*/bisst(addr) caddr_t addr; { return (0); }/*ARGSUSED*/copyin(udaddr, kaddr, n) caddr_t udaddr, kaddr; unsigned n; { return (0); }/*ARGSUSED*/copyout(kaddr, udaddr, n) caddr_t kaddr, udaddr; unsigned n; { return (0); }/*ARGSUSED*/setjmp(lp) label_t *lp; { return (0); }/*ARGSUSED*/longjmp(lp) label_t *lp; { /*NOTREACHED*/ }/*ARGSUSED*/setrq(p) struct proc *p; { }/*ARGSUSED*/remrq(p) struct proc *p; { }swtch() { if (whichqs) whichqs = 0; if (masterpaddr) masterpaddr = 0; }/*ARGSUSED*/resume(pcbpf) unsigned pcbpf; { }/*ARGSUSED*/fubyte(base) caddr_t base; { return (0); }/*ARGSUSED*/subyte(base, i) caddr_t base; { return (0); }/*ARGSUSED*/suibyte(base, i) caddr_t base; { return (0); }/*ARGSUSED*/fuword(base) caddr_t base; { return (0); }/*ARGSUSED*/fuiword(base) caddr_t base; { return (0); }/*ARGSUSED*/suword(base, i) caddr_t base; { return (0); }/*ARGSUSED*/suiword(base, i) caddr_t base; { return (0); }/*ARGSUSED*/useracc(udaddr, bcnt, rw) caddr_t udaddr; unsigned bcnt; { return (0); }/*ARGSUSED*/kernacc(addr, bcnt, rw) caddr_t addr; unsigned bcnt; { return (0); }/* * Routines handled by asm.sed script. *//*VARARGS1*//*ARGSUSED*/mtpr(reg, value) int reg, value; { }/*ARGSUSED*/mfpr(reg) int reg; { return (0); }spl0() { }spl4() { return (0); }spl5() { return (0); }spl6() { return (0); }spl7() { return (0); }/*ARGSUSED*/splx(s) int s; { }/*ARGSUSED*/bcopy(from, to, count) caddr_t from, to; unsigned count; { ; }/*ARGSUSED*/bzero(base, count) caddr_t base; unsigned count; { ; }/*ARGSUSED*/bcmp(s1, s2, count) caddr_t s1, s2; unsigned count; { return (0); }/*ARGSUSED*/scanc(size, cp, table, mask)unsigned size; caddr_t cp, table; int mask; { return (0); }/*ARGSUSED*/ffs(i) { return (0); }ntohs(s) u_short s; { return ((int)s); }htons(s) u_short s; { return ((int)s); }/* * Variables declared for savecore, or * implicitly, such as by config or the loader. */char	version[] = "4.2 BSD UNIX ....";char	etext;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -