From owner-freebsd-ppc@freebsd.org Mon Sep 12 21:11:55 2016 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD210BD2139 for ; Mon, 12 Sep 2016 21:11:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 919CCD69 for ; Mon, 12 Sep 2016 21:11:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from aurora.physics.berkeley.edu (aurora.physics.berkeley.edu [128.32.117.67]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u8CL0i3g019153 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 12 Sep 2016 14:00:44 -0700 Subject: Re: PowerMac G5 hangs/crashes on boot: 10.2, 11.0-RCx To: Krzysztof Parzyszek , Mark Millard References: <6ad00a2d-4213-18b8-7974-534aa3758837@swissmail.org> <0A9EB3C7-F430-4F82-9B09-632754BB82C8@dsl-only.net> <6B075CE8-2AF5-479C-8363-6F5F33A0B62F@dsl-only.net> <5fd3b681-1050-9602-b338-fe0dc5e10642@swissmail.org> Cc: freebsd-ppc@freebsd.org From: Nathan Whitehorn Message-ID: <3177b120-625b-49bb-dbc8-46ea99e46097@freebsd.org> Date: Mon, 12 Sep 2016 14:00:45 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <5fd3b681-1050-9602-b338-fe0dc5e10642@swissmail.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVa//iWD1MyTUvEk48UW5FKGITESQ/EESOMZxwGiczgBdepWB11aH8L/xJlvVZpxTKXJ7IIa0NcqvhH8XYjoTanYTNkWnnlX7iE= X-Sonic-ID: C;9MZ9+Ct55hGM4a/hcgQksw== M;gCW7+Ct55hGM4a/hcgQksw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2016 21:11:55 -0000 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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" >