Module Name: src
Committed By: matt
Date: Sat Jun 6 04:40:19 UTC 2015
Modified Files:
src/sys/arch/mips/mips: spl.S
Log Message:
If mipsNN and kernel has DDB, trap on bogus IPL values passed to splraise.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/spl.S
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/spl.S
diff -u src/sys/arch/mips/mips/spl.S:1.7 src/sys/arch/mips/mips/spl.S:1.8
--- src/sys/arch/mips/mips/spl.S:1.7 Fri Jun 5 19:58:01 2015
+++ src/sys/arch/mips/mips/spl.S Sat Jun 6 04:40:19 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: spl.S,v 1.7 2015/06/05 19:58:01 matt Exp $ */
+/* $NetBSD: spl.S,v 1.8 2015/06/06 04:40:19 matt Exp $ */
/*-
* Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -31,6 +31,7 @@
#include "opt_multiprocessor.h" /* MP kernel? */
#include "opt_cputype.h" /* which mips CPU levels do we support? */
+#include "opt_ddb.h"
#include <sys/cdefs.h>
@@ -38,7 +39,7 @@
#include <mips/asm.h>
#include <mips/cpuregs.h>
-RCSID("$NetBSD: spl.S,v 1.7 2015/06/05 19:58:01 matt Exp $")
+RCSID("$NetBSD: spl.S,v 1.8 2015/06/06 04:40:19 matt Exp $")
#include "assym.h"
@@ -217,6 +218,9 @@ STATIC_LEAF(_splsw_clrsoftintr)
END(_splsw_clrsoftintr)
STATIC_LEAF(_splsw_splraise)
+#if defined(DDB) && __mips >= 32
+ tgeiu a0, IPL_HIGH+1
+#endif
move a1, a0
PTR_LA v1, _C_LABEL(ipl_sr_map)
sll a2, a0, INT_SCALESHIFT