Add diagnostic code emptyidlespin verifying that the current IPL

is IPL_NONE and EE is set in the MSR.
This commit is contained in:
matt 2012-08-01 20:35:52 +00:00
parent 8c3b0a4f45
commit 73fa065a77
2 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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