Module Name: src
Committed By: macallan
Date: Wed Jul 27 22:04:23 UTC 2011
Modified Files:
src/sys/arch/powerpc/oea: ofw_subr.S ofwoea_machdep.c
Log Message:
move clearing PSL_IP in ofwmsr back where it was - if we do it too early my
PowerBook 3400c hangs on startup.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/oea/ofw_subr.S
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/oea/ofwoea_machdep.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/powerpc/oea/ofw_subr.S
diff -u src/sys/arch/powerpc/oea/ofw_subr.S:1.9 src/sys/arch/powerpc/oea/ofw_subr.S:1.10
--- src/sys/arch/powerpc/oea/ofw_subr.S:1.9 Sun Jun 12 16:35:10 2011
+++ src/sys/arch/powerpc/oea/ofw_subr.S Wed Jul 27 22:04:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_subr.S,v 1.9 2011/06/12 16:35:10 matt Exp $ */
+/* $NetBSD: ofw_subr.S,v 1.10 2011/07/27 22:04:23 macallan Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -34,6 +34,7 @@
.local firmstk
.globl openfirmware_entry
+ .globl ofwmsr
.local ofwsrsave
.local OF_buffer
@@ -41,7 +42,7 @@
.lcomm OF_buffer,NBPG,4
.comm openfirmware_entry,4,4 /* openfirmware entry point */
.lcomm ofwsrsave,64,4 /* openfirmware SR savearea */
- .lcomm ofwmsr,20,4 /* msr & sprg[0-3] used in OF */
+ .comm ofwmsr,20,4 /* msr & sprg[0-3] used in OF */
.comm ofwreal_incharge,4,4
/*
@@ -67,8 +68,14 @@
stw %r5,openfirmware_entry@l(%r8) /* save client interface handler*/
mfmsr %r0
- li %r8,PSL_IP
- andc %r0,%r0,%r8 /* make sure PSL_IP is off */
+/*
+ * XXX
+ * doing this here instead of later on in ofwoea_initppc() after setting
+ * up the console and such makes my PowerBook 3400c hang.
+ * Probably just another OF 2.0 weirdness
+ */
+ /*li %r8,PSL_IP*/
+ /*andc %r0,%r0,%r8*/ /* make sure PSL_IP is off */
lis %r9,ofwmsr@ha
stwu %r0,ofwmsr@l(%r9) /* save initial MSR value */
Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.24 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.25
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.24 Sun Jul 17 23:23:54 2011
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c Wed Jul 27 22:04:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.24 2011/07/17 23:23:54 dyoung Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.25 2011/07/27 22:04:23 macallan Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.24 2011/07/17 23:23:54 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.25 2011/07/27 22:04:23 macallan Exp $");
#include "opt_ppcarch.h"
#include "opt_compat_netbsd.h"
@@ -119,6 +119,7 @@
u_int timebase_freq = 0;
#endif
+extern int ofwmsr;
extern int chosen;
extern uint32_t ticks_per_sec;
extern uint32_t ns_per_tick;
@@ -201,6 +202,13 @@
if (ofmaplen > 0)
save_ofmap(ofmap, ofmaplen);
+/*
+ * XXX
+ * we need to do this here instead of earlier on in ofwinit() for some reason
+ * At least some versions of Apple OF 2.0.1 hang if we do this earlier
+ */
+ ofwmsr &= ~PSL_IP;
+
/* Parse the args string */
if (args) {
strcpy(bootpath, args);