Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc Add diagnostic code emptyidlespin v...
details: https://anonhg.NetBSD.org/src/rev/32b08c38cfba
branches: trunk
changeset: 780648:32b08c38cfba
user: matt <matt%NetBSD.org@localhost>
date: Wed Aug 01 20:35:52 2012 +0000
description:
Add diagnostic code emptyidlespin verifying that the current IPL
is IPL_NONE and EE is set in the MSR.
diffstat:
sys/arch/powerpc/powerpc/genassym.cf | 3 ++-
sys/arch/powerpc/powerpc/locore_subr.S | 12 +++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diffs (44 lines):
diff -r d5cd4e0d07aa -r 32b08c38cfba sys/arch/powerpc/powerpc/genassym.cf
--- a/sys/arch/powerpc/powerpc/genassym.cf Wed Aug 01 16:35:50 2012 +0000
+++ b/sys/arch/powerpc/powerpc/genassym.cf Wed Aug 01 20:35:52 2012 +0000
@@ -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 @@
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
diff -r d5cd4e0d07aa -r 32b08c38cfba sys/arch/powerpc/powerpc/locore_subr.S
--- a/sys/arch/powerpc/powerpc/locore_subr.S Wed Aug 01 16:35:50 2012 +0000
+++ b/sys/arch/powerpc/powerpc/locore_subr.S Wed Aug 01 20:35:52 2012 +0000
@@ -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 @@
#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
Home |
Main Index |
Thread Index |
Old Index