vrip_spl.S revision 1.1
11.1Stsutsui/*	$NetBSD: vrip_spl.S,v 1.1 2011/03/16 13:23:41 tsutsui Exp $	*/
21.1Stsutsui
31.1Stsutsui/*
41.1Stsutsui * Copyright (c) 1992, 1993
51.1Stsutsui *	The Regents of the University of California.  All rights reserved.
61.1Stsutsui *
71.1Stsutsui * This code is derived from software contributed to Berkeley by
81.1Stsutsui * Digital Equipment Corporation and Ralph Campbell.
91.1Stsutsui *
101.1Stsutsui * Redistribution and use in source and binary forms, with or without
111.1Stsutsui * modification, are permitted provided that the following conditions
121.1Stsutsui * are met:
131.1Stsutsui * 1. Redistributions of source code must retain the above copyright
141.1Stsutsui *    notice, this list of conditions and the following disclaimer.
151.1Stsutsui * 2. Redistributions in binary form must reproduce the above copyright
161.1Stsutsui *    notice, this list of conditions and the following disclaimer in the
171.1Stsutsui *    documentation and/or other materials provided with the distribution.
181.1Stsutsui * 3. Neither the name of the University nor the names of its contributors
191.1Stsutsui *    may be used to endorse or promote products derived from this software
201.1Stsutsui *    without specific prior written permission.
211.1Stsutsui *
221.1Stsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
231.1Stsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
241.1Stsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
251.1Stsutsui * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
261.1Stsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
271.1Stsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
281.1Stsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
291.1Stsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
301.1Stsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
311.1Stsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
321.1Stsutsui * SUCH DAMAGE.
331.1Stsutsui *
341.1Stsutsui * Copyright (C) 1989 Digital Equipment Corporation.
351.1Stsutsui * Permission to use, copy, modify, and distribute this software and
361.1Stsutsui * its documentation for any purpose and without fee is hereby granted,
371.1Stsutsui * provided that the above copyright notice appears in all copies.
381.1Stsutsui * Digital Equipment Corporation makes no representations about the
391.1Stsutsui * suitability of this software for any purpose.  It is provided "as is"
401.1Stsutsui * without express or implied warranty.
411.1Stsutsui *
421.1Stsutsui * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/loMem.s,
431.1Stsutsui *	v 1.1 89/07/11 17:55:04 nelson Exp  SPRITE (DECWRL)
441.1Stsutsui * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAsm.s,
451.1Stsutsui *	v 9.2 90/01/29 18:00:39 shirriff Exp  SPRITE (DECWRL)
461.1Stsutsui * from: Header: /sprite/src/kernel/vm/ds3100.md/vmPmaxAsm.s,
471.1Stsutsui *	v 1.1 89/07/10 14:27:41 nelson Exp  SPRITE (DECWRL)
481.1Stsutsui *
491.1Stsutsui *	@(#)locore.s	8.5 (Berkeley) 1/4/94
501.1Stsutsui */
511.1Stsutsui
521.1Stsutsui#include <mips/asm.h>
531.1Stsutsui#include <mips/cpuregs.h>
541.1Stsutsui
551.1Stsutsui	.set	noreorder
561.1Stsutsui
571.1Stsutsui#define VR_INT_MASK_PIU	MIPS_INT_MASK_0
581.1Stsutsui
591.1Stsutsui/*
601.1Stsutsui * void vrip_splpiu(void)
611.1Stsutsui *	disable all interrupts except PIU interrupt
621.1Stsutsui */
631.1StsutsuiLEAF_NOPROFILE(vrip_splpiu)
641.1Stsutsui	mfc0	v0, MIPS_COP_0_STATUS		# fetch status register
651.1Stsutsui	li	v1, ~MIPS_INT_MASK
661.1Stsutsui	and	v1, v0, v1			# turn off INT bit
671.1Stsutsui	li	v0, VR_INT_MASK_PIU
681.1Stsutsui	or	v0, v0, v1			# enable only PIU interrupt
691.1Stsutsui	mtc0	v0, MIPS_COP_0_STATUS		# store back
701.1Stsutsui	COP0_SYNC
711.1Stsutsui	j	ra
721.1Stsutsui	 nop
731.1StsutsuiEND(vrip_splpiu)
74