Module Name:    src
Committed By:   tnn
Date:           Sun Mar  6 21:03:01 UTC 2016

Modified Files:
        src/sys/arch/mips/mips: trap.c

Log Message:
Don't try to interpret MIPS3-specific status register bit on MIPS1.
Fixes boot of NetBSD/pmax in gxemul 3max emulation mode.


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/arch/mips/mips/trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.238 src/sys/arch/mips/mips/trap.c:1.239
--- src/sys/arch/mips/mips/trap.c:1.238	Thu Jun 11 15:50:17 2015
+++ src/sys/arch/mips/mips/trap.c	Sun Mar  6 21:03:01 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.238 2015/06/11 15:50:17 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.239 2016/03/06 21:03:01 tnn Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.238 2015/06/11 15:50:17 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.239 2016/03/06 21:03:01 tnn Exp $");
 
 #include "opt_cputype.h"	/* which mips CPU levels do we support? */
 #include "opt_ddb.h"
@@ -167,7 +167,7 @@ trap(uint32_t status, uint32_t cause, va
 	KSI_INIT_TRAP(&ksi);
 
 	curcpu()->ci_data.cpu_ntrap++;
-	if (status & MIPS3_SR_NMI) {
+	if (CPUISMIPS3 && (status & MIPS3_SR_NMI)) {
 		type = T_NMI;
 	} else {
 		type = TRAPTYPE(cause);

Reply via email to