Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips These are no longer used: replaced by loc...
details: https://anonhg.NetBSD.org/src/rev/9b573c2f165b
branches: trunk
changeset: 472146:9b573c2f165b
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Apr 23 00:10:15 1999 +0000
description:
These are no longer used: replaced by locore_mips1.S and locore_mips3.S.
diffstat:
sys/arch/mips/mips/locore_r2000.S | 1786 ----------------------------
sys/arch/mips/mips/locore_r4000.S | 2311 -------------------------------------
2 files changed, 0 insertions(+), 4097 deletions(-)
diffs (truncated from 4105 to 300 lines):
diff -r 78a2557b4865 -r 9b573c2f165b sys/arch/mips/mips/locore_r2000.S
--- a/sys/arch/mips/mips/locore_r2000.S Fri Apr 23 00:04:07 1999 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1786 +0,0 @@
-/* $NetBSD: locore_r2000.S,v 1.46 1998/12/25 16:52:10 msaitoh Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Digital Equipment Corporation and Ralph Campbell.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Copyright (C) 1989 Digital Equipment Corporation.
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies.
- * Digital Equipment Corporation makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/loMem.s,
- * v 1.1 89/07/11 17:55:04 nelson Exp SPRITE (DECWRL)
- * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAsm.s,
- * v 9.2 90/01/29 18:00:39 shirriff Exp SPRITE (DECWRL)
- * from: Header: /sprite/src/kernel/vm/ds3100.md/vmPmaxAsm.s,
- * v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL)
- *
- * @(#)locore.s 8.5 (Berkeley) 1/4/94
- */
-
-
-#define TRAP_FRAME_SIZE (4 * 38 + 4 * 4 + 4 + 4)
-#define TRAP_RA_OFFSET (TRAP_FRAME_SIZE - 4)
-#define TRAP_FRAME_OFFSET (4 * 4)
-#define INTR_FRAME_SIZE (4 * 38 + 4 * 4 + 4 + 4)
-#define INTR_RA_OFFSET STAND_RA_OFFSET
-#define INTR_FRAME_OFFSET STAND_FRAME_SIZE
-
-/*
- * Mark where code entered from exception hander jumptable
- * starts, for stack traceback code.
- */
-
- .globl _C_LABEL(mips1_exceptionentry_start)
-_C_LABEL(mips1_exceptionentry_start):
-
-/*
- *----------------------------------------------------------------------------
- *
- * mips1_UTLBmiss --
- *
- * Vector code for a MIPS-I user-space TLB miss from user-space.
- *
- *
- * This code is copied to the UTLB exception vector address to
- * handle user level TLB translation misses.
- * NOTE: This code must be relocatable!!!
- */
- .globl _C_LABEL(mips1_UTLBMiss)
-_C_LABEL(mips1_UTLBMiss):
- .set noat
- mfc0 k0, MIPS_COP_0_BAD_VADDR # get the virtual address
- lw k1, _C_LABEL(curpcb)
- bltz k0, 1f # R3000 chip bug
- lw k1, U_PCB_SEGTAB(k1) # get the current segment table
- srl k0, k0, SEGSHIFT # compute segment table index
- sll k0, k0, 2
- addu k1, k1, k0
- mfc0 k0, MIPS_COP_0_BAD_VADDR # get the virtual address
- lw k1, 0(k1) # get pointer to segment map
- srl k0, k0, PGSHIFT - 2 # compute segment map index
- andi k0, k0, (NPTEPG - 1) << 2
- beq k1, zero, 2f # invalid segment map
- addu k1, k1, k0 # index into segment map
- lw k0, 0(k1) # get page PTE
- nop
- beq k0, zero, 2f # dont load invalid entries
- mtc0 k0, MIPS_COP_0_TLB_LOW
- mfc0 k1, MIPS_COP_0_EXC_PC # get return address
- tlbwr # update TLB
- j k1
- rfe
-1:
- mfc0 k1, MIPS_COP_0_EXC_PC # get return address
- nop
- j k1
- rfe
-2:
- j mips1_SlowFault # handle the rest
- nop
- .set at
- .globl _C_LABEL(mips1_UTLBMissEnd)
-_C_LABEL(mips1_UTLBMissEnd):
-
-
-/*
- *----------------------------------------------------------------------------
- *
- * mips1_execption --
- *
- * Vector code for the general exception vector 0x80000080
- * on an r2000 or r3000.
- *
- * This code is copied to the general exception vector address to
- * handle all execptions except RESET and UTLBMiss.
- * NOTE: This code must be relocatable!!!
- *
- *----------------------------------------------------------------------------
- */
- .globl _C_LABEL(mips1_exception)
-_C_LABEL(mips1_exception):
-/*
- * Find out what mode we came from and jump to the proper handler.
- */
- .set noat
- mfc0 k0, MIPS_COP_0_STATUS_REG # Get the status register
- mfc0 k1, MIPS_COP_0_CAUSE_REG # Get the cause register value.
- and k0, k0, MIPS1_SR_KU_PREV # test for user mode
- sll k0, k0, 4 # shift user bit for cause index
- and k1, k1, MIPS1_CR_EXC_CODE # Mask out the cause bits.
- or k1, k1, k0 # change index to user table
-1:
- la k0, _C_LABEL(mips1_ExceptionTable) # get base of the jump table
- addu k0, k0, k1 # Get the address of the
- # function entry. Note that
- # the cause is already
- # shifted left by 2 bits so
- # we dont have to shift.
- lw k0, 0(k0) # Get the function address
- nop
- j k0 # Jump to the function.
- nop
- .set at
- .globl _C_LABEL(mips1_exceptionEnd)
-_C_LABEL(mips1_exceptionEnd):
-
-
-
-
-/*----------------------------------------------------------------------------
- *
- * mips1_SlowFault --
- *
- * Alternate entry point into the mips1_UserGenException or
- * or mips1_user_Kern_exception, when the ULTB miss handler couldn't
- * find a TLB entry.
- *
- * Find out what mode we came from and call the appropriate handler.
- */
-mips1_SlowFault:
- .set noat
- mfc0 k0, MIPS_COP_0_STATUS_REG
- nop
- and k0, k0, MIPS1_SR_KU_PREV
- bne k0, zero, _C_LABEL(mips1_UserGenException)
- nop
- .set at
-/*
- * Fall though ...
- */
-
-/*----------------------------------------------------------------------------
- *
- * mips1_KernGenException --
- *
- * Handle an exception from kernel mode.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------------
- */
-NNON_LEAF(mips1_KernGenException, TRAP_FRAME_SIZE, ra)
- .set noat
- .mask 0x80000000, (TRAP_RA_OFFSET - TRAP_FRAME_SIZE)
- subu sp, sp, TRAP_FRAME_SIZE
- sw AT, TRAP_FRAME_OFFSET+(AST * 4)(sp)
- sw v0, TRAP_FRAME_OFFSET+(V0 * 4)(sp)
- sw v1, TRAP_FRAME_OFFSET+(V1 * 4)(sp)
- sw a0, TRAP_FRAME_OFFSET+(A0 * 4)(sp)
- mflo v0
- mfhi v1
- sw a1, TRAP_FRAME_OFFSET+(A1 * 4)(sp)
- sw a2, TRAP_FRAME_OFFSET+(A2 * 4)(sp)
- sw a3, TRAP_FRAME_OFFSET+(A3 * 4)(sp)
- sw t0, TRAP_FRAME_OFFSET+(T0 * 4)(sp)
- mfc0 a0, MIPS_COP_0_STATUS_REG # 1st arg is STATUS
- sw t1, TRAP_FRAME_OFFSET+(T1 * 4)(sp)
- sw t2, TRAP_FRAME_OFFSET+(T2 * 4)(sp)
- sw t3, TRAP_FRAME_OFFSET+(T3 * 4)(sp)
- sw t4, TRAP_FRAME_OFFSET+(T4 * 4)(sp)
- mfc0 a1, MIPS_COP_0_CAUSE_REG # 2nd arg is CAUSE
- sw t5, TRAP_FRAME_OFFSET+(T5 * 4)(sp)
- sw t6, TRAP_FRAME_OFFSET+(T6 * 4)(sp)
- sw t7, TRAP_FRAME_OFFSET+(T7 * 4)(sp)
- sw t8, TRAP_FRAME_OFFSET+(T8 * 4)(sp)
- mfc0 a2, MIPS_COP_0_BAD_VADDR # 3rd arg is fault address
- sw t9, TRAP_FRAME_OFFSET+(T9 * 4)(sp)
- sw ra, TRAP_FRAME_OFFSET+(RA * 4)(sp)
- sw a0, TRAP_FRAME_OFFSET+(SR * 4)(sp)
- sw v0, TRAP_FRAME_OFFSET+(MULLO * 4)(sp)
- mfc0 a3, MIPS_COP_0_EXC_PC # 4th arg is PC
- sw v1, TRAP_FRAME_OFFSET+(MULHI * 4)(sp)
- sw a3, TRAP_FRAME_OFFSET+(PC * 4)(sp)
-#ifdef DDB
- addu v0, sp, TRAP_FRAME_SIZE # SP at trap for debugging
- sw v0, TRAP_FRAME_OFFSET+(SP * 4)(sp)
-#endif DDB
- jal _C_LABEL(trap)
- sw a3, TRAP_RA_OFFSET(sp) # for debugging
-
- lw a0, TRAP_FRAME_OFFSET+(SR * 4)(sp)
- lw t0, TRAP_FRAME_OFFSET+(MULLO * 4)(sp)
- lw t1, TRAP_FRAME_OFFSET+(MULHI * 4)(sp)
- mtc0 a0, MIPS_COP_0_STATUS_REG
- mtlo t0
- mthi t1
- lw k0, TRAP_FRAME_OFFSET+(PC * 4)(sp) # might be changed inside trap
- lw AT, TRAP_FRAME_OFFSET+(AST * 4)(sp)
- lw v0, TRAP_FRAME_OFFSET+(V0 * 4)(sp)
- lw v1, TRAP_FRAME_OFFSET+(V1 * 4)(sp)
- lw a0, TRAP_FRAME_OFFSET+(A0 * 4)(sp)
- lw a1, TRAP_FRAME_OFFSET+(A1 * 4)(sp)
- lw a2, TRAP_FRAME_OFFSET+(A2 * 4)(sp)
- lw a3, TRAP_FRAME_OFFSET+(A3 * 4)(sp)
- lw t0, TRAP_FRAME_OFFSET+(T0 * 4)(sp)
- lw t1, TRAP_FRAME_OFFSET+(T1 * 4)(sp)
- lw t2, TRAP_FRAME_OFFSET+(T2 * 4)(sp)
- lw t3, TRAP_FRAME_OFFSET+(T3 * 4)(sp)
- lw t4, TRAP_FRAME_OFFSET+(T4 * 4)(sp)
- lw t5, TRAP_FRAME_OFFSET+(T5 * 4)(sp)
- lw t6, TRAP_FRAME_OFFSET+(T6 * 4)(sp)
- lw t7, TRAP_FRAME_OFFSET+(T7 * 4)(sp)
- lw t8, TRAP_FRAME_OFFSET+(T8 * 4)(sp)
- lw t9, TRAP_FRAME_OFFSET+(T9 * 4)(sp)
- lw ra, TRAP_FRAME_OFFSET+(RA * 4)(sp)
- addu sp, sp, TRAP_FRAME_SIZE # restore kernel SP
- j k0
- rfe
- .set at
- .global _C_LABEL(mips1_KernGenExceptionEnd)
-_C_LABEL(mips1_KernGenExceptionEnd):
-END(mips1_KernGenException)
-
-/*----------------------------------------------------------------------------
- *
- * mips1_UserGenException --
- *
- * Handle an exception from user mode.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------------
- */
-NNON_LEAF(mips1_UserGenException, STAND_FRAME_SIZE, ra)
- .set noat
- .mask 0x80000000, (STAND_RA_OFFSET - STAND_FRAME_SIZE)
- lw k1, _C_LABEL(curpcb)
- nop
- sw AT, U_PCB_REGS+(AST * 4)(k1)
- sw v0, U_PCB_REGS+(V0 * 4)(k1)
- sw v1, U_PCB_REGS+(V1 * 4)(k1)
- sw a0, U_PCB_REGS+(A0 * 4)(k1)
- mflo v0
Home |
Main Index |
Thread Index |
Old Index