Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Sep 2016 20:11:31 +0300
From:      "Jukka A. Ukkonen" <jau789@gmail.com>
To:        freebsd-ppc@freebsd.org
Subject:   Re: [Bug 205458] 11.0-CURRENT/10-STABLE powerpc64: a PowerMac G5 specific sys/powerpc/ofw/ofw_machdep.c change for reliable PowerMac G5 booting (with lots of RAM)
Message-ID:  <3c513eea-cd94-7065-87b8-5200490b97c3@gmail.com>
In-Reply-To: <bug-205458-21-34YnzZWuVY@https.bugs.freebsd.org/bugzilla/>
References:  <bug-205458-21@https.bugs.freebsd.org/bugzilla/> <bug-205458-21-34YnzZWuVY@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On 09/13/16 09:31, bugzilla-noreply@freebsd.org wrote:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205458
> 
> --- Comment #5 from Mark Millard <markmi@dsl-only.net> ---
> Nathan Whitehorn has put out a kernel patch that he is asking for help with
> testing on PowerMac/iMac G5 variations. See:
> 
> https://lists.freebsd.org/pipermail/freebsd-ppc/2016-September/008413.html
> 
> The patch is not just using __powerpc64__ instead of POWERMAC_G5_SPECIFIC_BUILD
> in my presentation of my hack.
> 
> Nathan has already tested a PowerMac11,2.
> 
> If anyone reading this has any other type(s) of Apple G5's and is willing/able
> it would be good to get in some testing before the change is made to the
> kernel.
> 
> I expect that it does not mater much which version/variation of 10.x, 11.0, or
> 12 is used if the original boot problems can sometimes be observed before the
> change. Although I'm not sure of the patch automatically applies nicely to all
> possible vintages of those.
> 
> 
> As for me. . .
> 
> It will be a few weeks before I'll again have access in order to test a
> PowerMac7,2 (or to independently repeat PowerMac11,2 testing). I'll not have
> access to other Apple G5's. So my range of testing will be rather limited and
> will not be soon.
> 

Following Mark's advice I tried an alternate change and
now at least my PowerMac7,3 boots just fine through the
autoconfigure phase. The first hiccup I see is with tmpfs
mount to /tmp, but that, I hope, it is a completely
unrelated issue.

The patch I am now using on my PowerMac G5 is attached.
The modification is Mark's, I just tested it. I don't have
the foggiest idea where and how he figured out this change,
but at least in my test on one system only it seems to
work wonders.

--jau


PS.
If someone knows why the tmpfs has started complaining

mount: tmpfs: Operation not supported by device

where it previously (last 11.0-BETA2) worked just fine,
let me know.


[-- Attachment #2 --]
Index: sys/powerpc/ofw/ofw_machdep.c
===================================================================
--- sys/powerpc/ofw/ofw_machdep.c	(revision 305763)
+++ sys/powerpc/ofw/ofw_machdep.c	(working copy)
@@ -112,12 +112,11 @@
 	 * SPRG1-3 could be trashed
 	 */
 	__asm __volatile("mfsprg0 %0\n\t"
-			 "mtsprg0 %1\n\t"
-	    		 "mtsprg1 %2\n\t"
-	    		 "mtsprg2 %3\n\t"
-			 "mtsprg3 %4\n\t"
+	    		 "mtsprg1 %1\n\t"
+	    		 "mtsprg2 %2\n\t"
+			 "mtsprg3 %3\n\t"
 			 : "=&r"(ofw_sprg0_save)
-			 : "r"(ofmsr[1]),
+			 : 
 			 "r"(ofmsr[2]),
 			 "r"(ofmsr[3]),
 			 "r"(ofmsr[4]));

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3c513eea-cd94-7065-87b8-5200490b97c3>