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

Nathan Whitehorn nwhitehorn at freebsd.org
Mon Sep 12 21:11:55 UTC 2016



On 09/11/16 12:04, Krzysztof Parzyszek wrote:
> On 9/10/2016 7:12 PM, Mark Millard wrote:
>>
>> Your report that you have some sort of failure after booting during 
>> the likes of buildkernel is new as far as I know. Sending the list 
>> (and/or a bugzilla report) about the failure mode and related 
>> information may be appropriate and help in the future. (May be I 
>> missed an already existing report.)
>
> I think the issues with hangs are related to the temperature sensors.  
> I was getting console messages that the media temp sensor was 
> reporting 120C! I realized that as I replaced the hard drive, I 
> changed the position of the drive in a way that exposed the sensor to 
> the wind from the fans (it used to be angled a bit). Following this 
> line of thought, I stuck a piece of paper in front of the sensor and 
> things seem to work. At least work better than before. I have ordered 
> a replacement sensor from eBay, so hopefully that problem will go away.
>
> Regarding your "hack": it works perfectly! So far, my system (10.3 at 
> the moment) has booted every single time, no exceptions, traps, 
> unexpected conditions. This is too good to remain as a "hack". I have 
> no experience debugging the kernel and I don't know ABI the OFW 
> follows, but I wouldn't mind digging a bit deeper into it, if someone 
> shared some pointers.

I've finally understood why this helps. Open Firmware runs in virtual 
mode on the Powermac G5. This runs inside the kernel page table, which 
preserves all address translations made by OF before the kernel starts; 
as a result, the kernel address space is a strict superset of OF's.

Where this explodes is if OF uses an unmapped SLB entry. The SLB fault 
handler runs in real mode and refers to the PCPU pointer in SPRG0, which 
blows up the kernel. Having a value of SPRG0 that works for the kernel 
is less fatal than preserving OF's value in this case.

I believe that OF's SPRG0 is maintained only for compatibility with some 
G4 Apple hardware, the eMac in particular, but will check and we can 
move on with this. I think it should be safe to wrap this in an #ifdef 
__powerpc64__.
-Nathan

>
> This is all with powerpc64.
>
> I'll try checking if it helps with 11.0 next.
>
> -Krzysztof
>
> _______________________________________________
> freebsd-ppc at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
> To unsubscribe, send any mail to "freebsd-ppc-unsubscribe at freebsd.org"
>



More information about the freebsd-ppc mailing list