1/*
2 * linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_nmi.S
3 *
4 * NMI handler for Toshiba RBTX4927 board
5 *
6 * Copyright (C) 2003 TimeSys Corp.
7 *                    S. James Hill (James.Hill@timesys.com)
8 *                                  (sjhill@realitydiluted.com)
9 *
10 *  This program is free software; you can redistribute it and/or modify it
11 *  under the terms of the GNU General Public License as published by the
12 *  Free Software Foundation; either version 2 of the License, or (at your
13 *  option) any later version.
14 *
15 *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20 *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
21 *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
23 *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
24 *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 *  You should have received a copy of the GNU General Public License along
27 *  with this program; if not, write to the Free Software Foundation, Inc.,
28 *  675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30#include <asm/regdef.h>
31#include <asm/stackframe.h>
32
33		.align	5
34		.set noat
35		NESTED(tx4927_nmi_handler, PT_SIZE, sp)
36		SAVE_ALL
37		CLI
38		.set at
39		mfc0	k0, CP0_STATUS
40		lui	k1, 0x50		/* Clear BEV and NMI */
41		nor	k1, zero, k1
42		and	k0, k1
43		mtc0	k0, CP0_STATUS
44		move	a0, sp
45		jal	toshiba_rbtx4927_nmi
46		END(tx4927_nmi_handler)
47