From owner-freebsd-ppc@freebsd.org Sat Sep 10 20:41:57 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 8CC76BD2790 for ; Sat, 10 Sep 2016 20:41:57 +0000 (UTC) (envelope-from kristof@swissmail.org) Received: from smtp.swissmail.org (smtpout.swissmail.org [212.25.22.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A1D268D for ; Sat, 10 Sep 2016 20:41:56 +0000 (UTC) (envelope-from kristof@swissmail.org) Received: from vm-mailout1.vm.swissmail.org (vm-mailout1.vm.swissmail.org [212.25.22.134]) by smtp.swissmail.org (Postfix) with ESMTPS id C0F94807ED; Sat, 10 Sep 2016 22:36:32 +0200 (CEST) Received: from vm-pemfos2.intra.swissmail.org (unknown [192.168.173.55]) by vm-mailout1.vm.swissmail.org (Postfix) with ESMTP id 6F72C9FE18; Sat, 10 Sep 2016 22:41:47 +0200 (CEST) Received: from vm-pemfos2.intra.swissmail.org (localhost [127.0.0.1]) by localhost (PEmFoS-local-10025) with ESMTP id 61BB74A00C; Sat, 10 Sep 2016 22:41:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by localhost (PEmFoS/1560.21952.a1); Sat, 10 Sep 2016 22:41:47 +0200 (CEST) X-Pemfos-Policyd: accepted (DOw5uksZjBpZWioa6jroOXA/QX4OU1EoRTcTFF42EicvGDs8FAZlO97TB0BFJlUR) Subject: Re: PowerMac G5 hangs/crashes on boot: 10.2, 11.0-RCx To: Mark Millard References: <6ad00a2d-4213-18b8-7974-534aa3758837@swissmail.org> <0A9EB3C7-F430-4F82-9B09-632754BB82C8@dsl-only.net> Cc: Jukka Ukkonen , freebsd-ppc@freebsd.org From: Krzysztof Parzyszek Message-ID: Date: Sat, 10 Sep 2016 15:41:38 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <0A9EB3C7-F430-4F82-9B09-632754BB82C8@dsl-only.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.99.2 at vm-mailout1 X-Virus-Status: Clean 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: Sat, 10 Sep 2016 20:41:57 -0000 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