1*7c1de38aStsutsui/* $NetBSD: vrip_spl.S,v 1.1 2011/03/16 13:23:41 tsutsui Exp $ */ 2*7c1de38aStsutsui 3*7c1de38aStsutsui/* 4*7c1de38aStsutsui * Copyright (c) 1992, 1993 5*7c1de38aStsutsui * The Regents of the University of California. All rights reserved. 6*7c1de38aStsutsui * 7*7c1de38aStsutsui * This code is derived from software contributed to Berkeley by 8*7c1de38aStsutsui * Digital Equipment Corporation and Ralph Campbell. 9*7c1de38aStsutsui * 10*7c1de38aStsutsui * Redistribution and use in source and binary forms, with or without 11*7c1de38aStsutsui * modification, are permitted provided that the following conditions 12*7c1de38aStsutsui * are met: 13*7c1de38aStsutsui * 1. Redistributions of source code must retain the above copyright 14*7c1de38aStsutsui * notice, this list of conditions and the following disclaimer. 15*7c1de38aStsutsui * 2. Redistributions in binary form must reproduce the above copyright 16*7c1de38aStsutsui * notice, this list of conditions and the following disclaimer in the 17*7c1de38aStsutsui * documentation and/or other materials provided with the distribution. 18*7c1de38aStsutsui * 3. Neither the name of the University nor the names of its contributors 19*7c1de38aStsutsui * may be used to endorse or promote products derived from this software 20*7c1de38aStsutsui * without specific prior written permission. 21*7c1de38aStsutsui * 22*7c1de38aStsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23*7c1de38aStsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24*7c1de38aStsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25*7c1de38aStsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26*7c1de38aStsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27*7c1de38aStsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28*7c1de38aStsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29*7c1de38aStsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30*7c1de38aStsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31*7c1de38aStsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*7c1de38aStsutsui * SUCH DAMAGE. 33*7c1de38aStsutsui * 34*7c1de38aStsutsui * Copyright (C) 1989 Digital Equipment Corporation. 35*7c1de38aStsutsui * Permission to use, copy, modify, and distribute this software and 36*7c1de38aStsutsui * its documentation for any purpose and without fee is hereby granted, 37*7c1de38aStsutsui * provided that the above copyright notice appears in all copies. 38*7c1de38aStsutsui * Digital Equipment Corporation makes no representations about the 39*7c1de38aStsutsui * suitability of this software for any purpose. It is provided "as is" 40*7c1de38aStsutsui * without express or implied warranty. 41*7c1de38aStsutsui * 42*7c1de38aStsutsui * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/loMem.s, 43*7c1de38aStsutsui * v 1.1 89/07/11 17:55:04 nelson Exp SPRITE (DECWRL) 44*7c1de38aStsutsui * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAsm.s, 45*7c1de38aStsutsui * v 9.2 90/01/29 18:00:39 shirriff Exp SPRITE (DECWRL) 46*7c1de38aStsutsui * from: Header: /sprite/src/kernel/vm/ds3100.md/vmPmaxAsm.s, 47*7c1de38aStsutsui * v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL) 48*7c1de38aStsutsui * 49*7c1de38aStsutsui * @(#)locore.s 8.5 (Berkeley) 1/4/94 50*7c1de38aStsutsui */ 51*7c1de38aStsutsui 52*7c1de38aStsutsui#include <mips/asm.h> 53*7c1de38aStsutsui#include <mips/cpuregs.h> 54*7c1de38aStsutsui 55*7c1de38aStsutsui .set noreorder 56*7c1de38aStsutsui 57*7c1de38aStsutsui#define VR_INT_MASK_PIU MIPS_INT_MASK_0 58*7c1de38aStsutsui 59*7c1de38aStsutsui/* 60*7c1de38aStsutsui * void vrip_splpiu(void) 61*7c1de38aStsutsui * disable all interrupts except PIU interrupt 62*7c1de38aStsutsui */ 63*7c1de38aStsutsuiLEAF_NOPROFILE(vrip_splpiu) 64*7c1de38aStsutsui mfc0 v0, MIPS_COP_0_STATUS # fetch status register 65*7c1de38aStsutsui li v1, ~MIPS_INT_MASK 66*7c1de38aStsutsui and v1, v0, v1 # turn off INT bit 67*7c1de38aStsutsui li v0, VR_INT_MASK_PIU 68*7c1de38aStsutsui or v0, v0, v1 # enable only PIU interrupt 69*7c1de38aStsutsui mtc0 v0, MIPS_COP_0_STATUS # store back 70*7c1de38aStsutsui COP0_SYNC 71*7c1de38aStsutsui j ra 72*7c1de38aStsutsui nop 73*7c1de38aStsutsuiEND(vrip_splpiu) 74