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

📄 locore.s

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 S
📖 第 1 页 / 共 5 页
字号:
/*    @(#)locore.s	4.10     (ULTRIX)        4/11/91     *//************************************************************************ *									* *			Copyright (c) 1983 - 1989 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: /sys/vax/locore.s  * * 11-Apr-91	dlh *	add call to vp_reset() during slavestart; call will be made if this CPU *	is in vpmask. * * 30-Jan-91    jaw *	fix branch in stop cpu to properly save off stack pointer... * * 21-Jan-91	dlh *	In the case of the VAX9000, the routine cpuident() is accessing the *	wrong register to find out which cpu it is.  It was accessing the *	CPUCNF.  It now accesses CPUID. * * 10-Oct-90	paradis *	Modify Xprotflt handler to parse all the bits in the *	trap type word (including the new vector memory fault *	bits) * * 10-Oct-90	dlh *	add vector support for the Mariah (VAX6000-5xx) * * 4-Sep-90	dlh *	added support for vector processor support *		- entry point for vector disabled fault *		- Rigel - correct the way ACCS is dealt with - want to  *		  deal with FPA and vector present bit separately *		- a process which is a vector process needs to call *		  vp_contextlimbo() *		- added routine is_legal_vector_instruction() * * 31-Aug-90	paradis *	Removed debug scaffolding from call to ka9000_rxfct_isr(). *	Removed call to ka9000_txfct_isr() entirely since we don't *	use it anymore. *	Set modify bit in PTEs for all kernel-writeable pages.  This *	(a) prevents crashes due to taking modify faults inside *	fault handlers, and (b) keeps us from taking superfluous  *	kernel modify faults (we don't do anything with them anyway). * * 03-Aug-90	rafiey (Ali Rafieymehr) *	Added support for VAX9000. * * 19-Jun-90 -- jmartin *	Fixes for "panic: vrelvm rssize" * * 07-Jun-90 jas *	Added code to Slavestart.  If VAX is 6400/6500, load ACCS with *	0.  This will put 6500 in 30-bit mode, and have no affect on 6400. * * 06-Jun-90 pmk *	Remove ci0int routine, ci vector interrupt routine now made by *	config. * * 01-May-90 jas *	added 6500 support. * * 30-Mar-90 jaw *	allow 6200 to recover from hard error. * * 03-Mar-90 jaw *	primitive change to optimize mips. * * 17-Nov-89    Paul Grist *      modified so that the pointer to the pc/psl will be passed for *      an nmifault for some 8800 error handling inmprovements. * * 09-Nov-89 	bp *	Checked that physical memory doesn't exceed 511.5 Mb and *	when it does set it to 511.5 Mb *	optimized distcl-jmartin request *	have __km_alloc return null when index < MINBUCKET * * 20-Jul-89	rafiey (Ali Rafieymehr) *	Deleted the stub routine xmisst(). The real routine is now *	defined in xmiinit.c. * * 20-Jun-89 -- jaw *	fix old 780 bug where it falsely claims to have a protection *	fault.  fix stolen from VMS. * * 13-Jun-89 -- jmartin *	Change calculation of P0LR for physical-to-virtual transition *	to accomodate SVS kernel.  Before each LDPCTX instruction *	write 255 and 0 respectively into PCB_PRVCPU and PCB_ASN. *	This is minimal support for ECO 119. * * 30-May-89	darrell *	Added include of ../../machine/common/cpuconf.h -- cpu types *	were moved there.  Changed the values for processor types, *	and other things for the new cpusw. * * 22-May-89 -- darrell *	Changed tocons to cons_putc -- as part of the new cpusw. * * 18-May-89	Jaw *	fix MSI/CI interrupt vectors to count interrupts in percpu structure. *	fix baddaddr for 6400. * * 12-May-89	Todd M. Katz		TMK0002 *	1. Increment counter on all CI interrupts.  Also, change the name of *	   the SCB vector from Xcia0int -> Xci0int.  Note: The second CI SCB *	   vector, Xci1int() has been deleted because only a single CI port *	   is currently supported. *	2. Completely change MSI interrupt code. *	3. Include header file "msi.h". * * 12-May-89 -- darrell *	Merged V3.1 changes. * * 5-May-89 --	Adrian Thoms *	Moved VAX_6200 to cpu #14 for VVAX *	Added VVAX dump routines v_qio and v_qioinit * * 07-March-89 -- gmm *	release_uarea_noreturn uses u_procp, instead of an argument to get *	the current proc pointer.  * * 15-Feb-89 -- jaw *	Add check to copyin/copyout to make sure not spin locks are held. * * 09-Feb-89 -- jaw *	Move CPU_TBI state flag to seperate longword.  This was done *	because the state flag field can only be written by the cpu *	who owns it. * * 1-Feb-89	Tom Kong *	Added workaround for Rigel 2nd pass bug.  When probing NXM *	that causes machine checks, clear Rigel error registers. * * 10 Jan 89 -- kong *	Added Rigel (VAX6400) support.  Added comments about CPU/system *	identification. * *  02-Feb-89	jaw *	Make longjmp mpsafe.  move newpc and newfp global to per-cpudata base. * * 17-Nov-88	darrell *	Added ka60memerr SCBVEC entry for Firefox bus error handling * *  26-Jan-89	jaw *	fix up start/stop cpu. * * 23-Jan-89 -- jmartin *	Introduce a new trap type NOACCESS for protection fault on read. * * 12-Jan-89 - jaw *	merge Xe changes for FFox drivers * * 03 Jan 89 -- jaw *	fix branch in stop_secondary_cpu * * 29 Dec 88 -- jmartin *	Zero physical memory from _edata to (vmbinfo). * * 08 Dec 88 -- jaw  *	When panicing the system put the cpu's into tight loop * 	after flushing out context. * * 22 Nov 88 -- jaw  *	fix case where we were sending signal to our parent before we *	were REALLY stopped....  more magic. * * 10 Oct 88 -- jaw *	test for lock held after swtch. * * 31 Aug 88 -- jmartin *	Use the lock lk_text in Fastreclaim.  Rationalize Fastreclaim *	to use longword operands and to avoid branching on the primary *	code path. * * 19 Aug 88 -- miche *	cleaned up context switch code for SMP * * 25 Jul 88 -- jmartin *	Use the lock lk_cmap in Fastreclaim.  Also don't write the bit *	SPTECHG to (struct proc *)foo->p_vm, because VAXen don't care. * * 18-Jun-88 -- jaw  change to new cpu data format. * * 22 Apr 88 -- mbh *	Slave checks for work to do on all queues.  This section *	should be consolidated with that of the primary processor. * * 24 Mar 88 -- prs *	Changed copy*str routines to return ENAMETOOLONG, instead *	of ENOENT for POSIX conformance. * * 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. * ***********************SMP rev history above * 17-Oct-88	jaw *	Prefetch istream in bisst routine so that 8200 won't machinecheck. * * 01-Sep-88	darrell *	Added a call to ka60initslave to turn on the slave processors *	internal cache. * * 30-Aug-88	jaw *	add proc field p_master to fix ASMP bug. * * 18-Aug-88	darrell *	Added multiprocessor support for VAX60, and a call to chrqueue *	in the fcpdma code to get around the fact that the VAX60 console *	DZ interrupts come in at IPL 16. * * 08-Aug-88	Fred Canter *	Temporary fix for PVAX SCSI/SCSI controller hardware hack. *	Do an I/O space access each time thru the idle loop to *	generate address strobe needed to allow the SCSI/SCSI *	controller temporary hardware fix to work. * * 15-Jul-88	Todd M. Katz		TMK0001 *	Add stub xmisst() routine for resetting XMI nodes. * * 15-July-88	robin *	Added cpu_sub_subtype because cpu_systype was being misused.  This *	allows sizer and uerf to both work for the KA640. * * 26-Apr-88    jaw *	Add VAX8820 support. * * 24-Mar-88 -- robin *	added code to set up the interupt vec. for ka640 lance chips (NI) *	 * 07-Mar-88 -- prs *	Changed copy*str routines to return ENAMETOOLONG, instead *	of ENOENT for POSIX conformance. * * 12-Feb-88 -- fred (Fred Canter) *	Changes for VAX420 (CVAXstar/PVAX) support. *	Added case 11 to all casel statements. *	Modified MVAX class cpu ident code. *	Save arch_ident bits in SID EXT register. * * 25-Jan-88 -- rsp (Ricky Palmer) *      Added interrupt code for MSI. * * 19-Jan-88 -- jaw *	added cpu support for Calypso.  Also moved intrcpu into machdep  *	because the routine shouldn't be written in assembly code. * * 12-11-87	Robin L. and Larry C. *	Added portclass/kmalloc support to the system. * * 2-Oct-87	robin *	fixed a problem which stoped the AIO init process from working. *	The arg to qioinit is indirect and the code was direct. * * 20-Apr-87 -- afd *	Removed work-around for bugs in the P1 CVAX chips. * * 19-Mar-87 -- fred (Fred Canter for Brian Stevens) *	Schedule X from the idle loop. * * 06-Mar-87 -- afd *	Added CPU specific support for Mayfair/CVAX. *  * 03 Feb 87 -- depp and woodward *	Reinstated the "yech" code in Swtch()/Resume().  It was removed *	during the multiprocessing work.  It will only be invoked on the *	master CPU. * * 21 Jan 87 -- jaw *	performance fixes to syscall. * *  16-Dec-86 -- pmk *	Changed 750 console tu58 intr. branch to turintr instead of tudma. *	750 now uses MRSP protocol * *  27-Aug-86 -- fred (Fred Canter) *	Removed kludge used to identify pass 1 standard cell VAXstar CPUs. * *  5-Aug-86 -- fred (Fred Canter) *	Minor changes to VAXstar SLU pseudo DMA code (sspdma). * * 18-Jun-86 -- jaw *	bisst fix to set NOARB before hitting a node over the head. * * 18-Jun-86 -- fred (Fred Canter) *	Changes for VAXstar kernel support. * * 22-May-86 -- prs *	Added time saving measure to the qioinit routine for *	the generic dump driver. * * 18-Apr-86 -- jaw	hooks for nmi faults and fixes to bierrors. * * 16-Apr-86 -- darrell *	changed badaddr to bbadaddr -- to allow the routine  *	badaddr for backward comaptibility. * * 15-Apr-86 -- jf *	Add support for system processes. * * 14-Apr-86 -- afd *	Re-did mutually exclusive MicroVAX areas.  Mainly this is *	putting MicroVAX into the case stmts with other cpus. * * 09-Apr-86 -- prs *	Added two qio calls to use the vmb boot driver. These routines *	are called from the generic dump driver. * * 09-Apr-86 -- jaw  add dispatchs for multiple bi error routines. * * 02-Apr-86 -- jrs *	Rewrite scheduler to eliminate special master queue. *	Add code in inter-processor interrupts for panic handling. * * 18-Mar-86 -- jrs *	Change intrslave to intrcpu to do one at a time.  Changed *	entry conditions for cpuindex and merged w/ cpuident. *	Added Jim's change to keep ipl at 1f until machine specific *	autoconfig called. * * 18-mar-86  -- jaw     br/cvec changed to NOT use registers. * * 10-Mar-86 -- pmk *	change panic() entry mask to 0x0fff, save r0-r11 for errlogging. * * 06-Mar-86 -- tresvik *	clear RPB rp_flag so dump will work after copying in VMB's RPB * * 03-Mar-86 -- jrs *	Added code to initialize secondary processor start address in rpb * * 25-Feb-86 -- jrs *	Once again removed cold start check for rxcd routine that was *	accidentally added back in previous edit * * 19-Feb-86 -- bjg *	Added sbi error logging, uba error logging *	Changed doadump to do tbia before accessing rbp to prevent  *	protection fault on 8600 * * 18-Feb-86 -- jrs *	Change slavestart to _slavestart so we can pick it up from c. *	Also get slave into virtual mode a little sooner. *	Cold start check moves up to rxcd() routine. * * 18-Mar-86 -- jaw  add routines to cpu switch for nexus/unibus addreses *		     also got rid of some globals like nexnum. *		     ka8800 cleanup. * * 12-Feb-86 -- pmk *	Added save pc,psl to bierror * * 12-Feb-86 -- jrs *	Changed scheduling loop to only do TBIA on demand * * 05-Feb-86 -- jrs *	Added save of pcbb address for adb backtrace * * 04-Feb-86 -- tresvik *	added VMB boot path support * * 03-Feb-86 -- jaw  Set ingnorebi error bit so to ignore errors VMB cause. * * 20 Jan 86 -- bjg *	Added stray interrupt error logging (logstray) * * 17-Jul-85 -- jrs *	Add run queue locking * * 26-Oct-85 -- jaw * 	Fix to bisst() to reset BDA properly once system is up. * * 25-Sep-85 -- jaw *	Fix to bisst to mask problem with BIIC SST bit. *	After a dump...halt a 8200 so memory is preserved. * * 09 Sep 85 -- Reilly *	Modified to handle the new 4.3BSD namei code. * 03-Sep-85 -- jaw *	Added BI error interrupt code. * * 09-AUG-85 -- darrell dunnuck *	Unibus zero vectors are now counted here in locore.  We set a *	timer in ubaerror on the first zero vector that comes in, *	and count them here in locore until the timer has expired. *	We never do a unibus reset no matter how many zero vectors we get. * * 26-Jul-85 -- jaw *	fixed up Violation to SRM...TBIA data MBZ. * * 18-Jul-85 -- tresvik *	Change the way the end of doadump causes a reboot.  Call tocons *	instead of duplicating C code here in assembly.  VAX 8600 requires *	special handling already defined in tocons. * * 11-Jul-85 -- tresvik *	Fix bug in handling write timeout.  Branching around the PANIC *	macro requires local label other than 1, since 1 is already used *	within the macro. * * 19-Jun-85 -- jaw *	VAX8200 name change. * * 06-Jun-85 -- Jaw *	got rid of badwrite and replaced it with bisst().  * * 05-May-85 -- Larry Cohen * 	network interrupt vectors are now configurable * * 16-Apr-85 -- lp *      Added cpu serial line support for VAX8200. Changed tu58  *      interface for non-MRSP machines.  * *  9 Apr 85 -- depp *	Added check for Allocated shared memory page in Fastreclaim * * 22-Mar-85 -- reilly *	Added support for floating point emulation for non microvaxes * * 13-Mar-85 -jaw *	Changes for support of the VAX8200 were merged in. * * 3-MAR-85 -- darrell *    handle sbi interupts. * * 27-Feb-85 -tresvik *	Changes for support of the VAX8600 were merged in. * * 17 Dec 84 -- jrs *	Change setjmp, resume to use new regs to avoid swap problems. *	Also add savectx for same reason.  Update code in copyin/copyout *	so it can be used with new inline program. * * 06 Nov 84 -- jrs *	Reroll code in swtch/resume to avoid double context switch *	and handle most likely case linearly. * * 31 Oct 84 -- jrs *	Remove auto calls to dh and dz timer routines in softclock. *	These are now done on a demand basis at a higher level * * 20 Aug 84 -- larry *	removed system page table and made it a seperate file - spt.s *	so that SYSPTSIZE could be configurable on a binary kernel. * *  5 May 84 -- rjl *	Added QVSS support. The bit map looks like regular memory so some *	of the normal autoconfiguration stuff has to be done here. * * 12 Apr 84 -- rjl *	Added float type check for MicroVAX * * 23 Mar 84 -- slr *	Added emulation support for MicroVAX * * 15 Feb 84 -- rjl *	Added support for MicroVAX intelligent boot. Now saving *	r10 and r11 as bootdevice and boothowto for later use by *	autoconfig.

⌨️ 快捷键说明

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