Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/oea move clearing PSL_IP in ofwmsr back whe...



details:   https://anonhg.NetBSD.org/src/rev/cc93d23ff69a
branches:  trunk
changeset: 767693:cc93d23ff69a
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Jul 27 22:04:23 2011 +0000

description:
move clearing PSL_IP in ofwmsr back where it was - if we do it too early my
PowerBook 3400c hangs on startup.

diffstat:

 sys/arch/powerpc/oea/ofw_subr.S       |  15 +++++++++++----
 sys/arch/powerpc/oea/ofwoea_machdep.c |  12 ++++++++++--
 2 files changed, 21 insertions(+), 6 deletions(-)

diffs (83 lines):

diff -r e573e60353aa -r cc93d23ff69a sys/arch/powerpc/oea/ofw_subr.S
--- a/sys/arch/powerpc/oea/ofw_subr.S   Wed Jul 27 21:50:16 2011 +0000
+++ b/sys/arch/powerpc/oea/ofw_subr.S   Wed Jul 27 22:04:23 2011 +0000
@@ -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 */
 
diff -r e573e60353aa -r cc93d23ff69a sys/arch/powerpc/oea/ofwoea_machdep.c
--- a/sys/arch/powerpc/oea/ofwoea_machdep.c     Wed Jul 27 21:50:16 2011 +0000
+++ b/sys/arch/powerpc/oea/ofwoea_machdep.c     Wed Jul 27 22:04:23 2011 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index