PowerMac G5 hangs/crashes on boot: 10.2, 11.0-RCx

Krzysztof Parzyszek kristof at swissmail.org
Sat Sep 10 20:41:57 UTC 2016


On 9/9/2016 3:21 PM, Mark Millard wrote:
>
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205458 (from 2015-Dec-20)
>
> It reports as the technique:
>
>> The change is in ofw_sprg_prepare of sys/powerpc/ofw/ofw_machdep.c and could look something like (presented in a form to show new/PowerMacG5-Specific code and old general code):
>>
>> #ifdef POWERMAC_G5_SPECIFIC_BUILD
>> 	__asm __volatile("mfsprg0 %0\n\t"
>> 			 "mtsprg1 %1\n\t"
>> 			 "mtsprg2 %2\n\t"
>> 			 "mtsprg3 %3\n\t"
>> 			 : "=&r"(ofw_sprg0_save)
>> 			 : "r"(ofmsr[2]),
>> 			 "r"(ofmsr[3]),
>> 			 "r"(ofmsr[4]));
>> #else
>> // The historical code:
>> 	__asm __volatile("mfsprg0 %0\n\t"
>> 			 "mtsprg0 %1\n\t"
>> 			 "mtsprg1 %2\n\t"
>> 			 "mtsprg2 %3\n\t"
>> 			 "mtsprg3 %4\n\t"
>> 			 : "=&r"(ofw_sprg0_save)
>> 			 : "r"(ofmsr[1]),
>> 			 "r"(ofmsr[2]),
>> 			 "r"(ofmsr[3]),
>> 			 "r"(ofmsr[4]));
>> #endif
>>
>> In other words: for PowerMac G5's omit the mtsprg0 from ofmsr[1]: leave the register as it already is instead of resetting it. The value in ofmsr[1] is inappropriate to the context. I deliberately kept the change minimal and left in all other code related to the register.
>

Hi Mark,

I reinstalled 10.3, and it boots *sometimes*.  I cannot try this change 
though, because it hangs well before the kernel finishes building.

The custom kernel I had before was quite stable, once it booted, but at 
the moment I cannot get any kernel to build.

-Krzysztof



More information about the freebsd-ppc mailing list