Module Name: src
Committed By: matt
Date: Wed Aug 1 20:35:53 UTC 2012
Modified Files:
src/sys/arch/powerpc/powerpc: genassym.cf locore_subr.S
Log Message:
Add diagnostic code emptyidlespin verifying that the current IPL
is IPL_NONE and EE is set in the MSR.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/powerpc/genassym.cf
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/powerpc/powerpc/locore_subr.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/powerpc/powerpc/genassym.cf
diff -u src/sys/arch/powerpc/powerpc/genassym.cf:1.8 src/sys/arch/powerpc/powerpc/genassym.cf:1.9
--- src/sys/arch/powerpc/powerpc/genassym.cf:1.8 Mon Jun 20 08:18:28 2011
+++ src/sys/arch/powerpc/powerpc/genassym.cf Wed Aug 1 20:35:52 2012
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.8 2011/06/20 08:18:28 matt Exp $
+# $NetBSD: genassym.cf,v 1.9 2012/08/01 20:35:52 matt Exp $
#-
# Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -65,6 +65,7 @@ include <powerpc/psl.h>
define IPL_HIGH IPL_HIGH
define IPL_SCHED IPL_SCHED
define IPL_VM IPL_VM
+define IPL_NONE IPL_NONE
define CPU_MAXNUM CPU_MAXNUM
Index: src/sys/arch/powerpc/powerpc/locore_subr.S
diff -u src/sys/arch/powerpc/powerpc/locore_subr.S:1.48 src/sys/arch/powerpc/powerpc/locore_subr.S:1.49
--- src/sys/arch/powerpc/powerpc/locore_subr.S:1.48 Sun Feb 19 21:06:23 2012
+++ src/sys/arch/powerpc/powerpc/locore_subr.S Wed Aug 1 20:35:52 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: locore_subr.S,v 1.48 2012/02/19 21:06:23 rmind Exp $ */
+/* $NetBSD: locore_subr.S,v 1.49 2012/08/01 20:35:52 matt Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -295,7 +295,17 @@ switchto_restore:
#endif
ldreg %r0,CFRAME_LR(%r1)
mtlr %r0
+ blr /* CPUINIT needs a raw blr */
+
ENTRY_NOPROFILE(emptyidlespin)
+#ifdef DIAGNOSTIC
+ GET_CPUINFO(%r3)
+ lbz %r4,CI_CPL(%r3)
+ twnei %r4,IPL_NONE
+ mfmsr %r5
+ andi. %r5,%r5,PSL_EE@l
+ tweqi %r5,PSL_EE@l
+#endif
blr /* CPUINIT needs a raw blr */
#ifdef __HAVE_FAST_SOFTINTS