From owner-freebsd-ppc@freebsd.org Fri Sep 16 15:36:05 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 58C0CBDD795 for ; Fri, 16 Sep 2016 15:36:05 +0000 (UTC) (envelope-from jau789@gmail.com) Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA5E3E94; Fri, 16 Sep 2016 15:36:04 +0000 (UTC) (envelope-from jau789@gmail.com) Received: by mail-lf0-x242.google.com with SMTP id s64so5172031lfs.2; Fri, 16 Sep 2016 08:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=DPKkjvdnLq1lxLjcPTNMcxJrZ2s0LYgk8YpJbZ6xXjY=; b=R9jxeTkZdD7B5QWExkjBNXL+IS2G6xsRsTWj4DOIU/it+dMLqbdd6F3OfvIc/arV65 1jgjclink4rG/SEd7iiUdVqijMaCrvGqaTmsnRxy0NT2AagqYjclE5WfYI7ohg4aKQhT +nz/AlentVOo9M5UMZfF3MmKy3+vo2/utDYrrBGfXLoEVrIvEt/K3vOCCyEV5zXJlt7q /MHAIqPvYN06JhsD5GcbGuP2rRxQ5Tih5cycspmK8pDxW07da3VjvEBiqdxN5yfOojwB YrO5vxXc7QpD175l394/0MW+6ejHwhHzO6OUG2D2fz2V4YgwWMt3f6CWKY0uKKUqt60a Bxrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=DPKkjvdnLq1lxLjcPTNMcxJrZ2s0LYgk8YpJbZ6xXjY=; b=aQFFw2jdwB8/kjXC+uWKOTU3KdXQJmtqQ23OZUQs9V7rBwDdQtXJJetsCcKpaZH8XO 3hn5RW1kyZR4ZUU5FMB3YHfZr3pFT4rVc3FP3QlomvdLCHaakXmwE7JDzWfsdU/Q29r2 viKQpq0t9PT6WyWOgPsNHLEdOOckLrV/DBXPZ3/EhTDvJNs3/pyYuyHrEnsW0BowXz5q TvsKdAEeefHQRuof6Ooft2IrEBaycujRlvrGTB9zGZ7EXY9vIUE2cEbhCF4XuTxrF9hM oV0sLkbTnTSRA+xECIc8HLxVrcPzPLqwWd7ludp5JIeltTKQ+xadvxsFzWqgGNp6EvZl c7Pg== X-Gm-Message-State: AE9vXwNaZQ0nHLKziqWtmTZQ0yOk6a1+iiFjy7CNPI+LZtHWIHLVMmN3aonVq432eSy8pg== X-Received: by 10.25.210.205 with SMTP id j196mr6562126lfg.139.1474040162627; Fri, 16 Sep 2016 08:36:02 -0700 (PDT) Received: from [192.168.1.131] (xdsl-205-1.nblnetworks.fi. [83.145.205.1]) by smtp.googlemail.com with ESMTPSA id 137sm2394868ljj.47.2016.09.16.08.36.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 08:36:01 -0700 (PDT) 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) To: Nathan Whitehorn , freebsd-ppc@freebsd.org References: <3c513eea-cd94-7065-87b8-5200490b97c3@gmail.com> <521c75a2-9223-88c9-93cd-e091890003e1@gmail.com> <8a4035e9-19e4-89c4-364f-8914a703eea2@freebsd.org> From: "Jukka A. Ukkonen" Message-ID: Date: Fri, 16 Sep 2016 18:36:00 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <8a4035e9-19e4-89c4-364f-8914a703eea2@freebsd.org> Content-Type: multipart/mixed; boundary="------------D0B50E7E8E81236165F464C6" 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: Fri, 16 Sep 2016 15:36:05 -0000 This is a multi-part message in MIME format. --------------D0B50E7E8E81236165F464C6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit On 09/14/16 17:17, Nathan Whitehorn wrote: > > On 09/14/16 00:57, Jukka A. Ukkonen wrote: >> On 09/13/16 20:28, Nathan Whitehorn wrote: >>> Maybe firmware needs SPRG1-3 restored? Any chance you could try deleting >>> the mtsprg1-3 one-by-one? >>> -Nathan >> But of course. It will take some time, though. >> Is there any particular order I should try them? >> 1, 2, and 3? >> I mean you and Mark obviously have a lot better >> understanding about ppc and what to expect when >> one touches sprg#. I will be flying pretty much >> blindfolded. >> >> --jau >> > > I'm flying blind here too. It's one of SPRG1 or SPRG3 that I expect > firmware needs restored on your system. SPRG2 is obliterated by the SLB > fault handler, so if firmware needs it, we can't provide it anyway. And > we know it doesn't need SPRG0 since Mark's patch works for you. > -Nathan Right, it seems my PowerMac G5 is perfectly happy with this... __asm __volatile("mfsprg0 %0\n\t" : "=&r"(ofw_sprg0_save) : ); This does not seem all unexpected when I read the hardware specification for these registers. See the attachment. In case OFW does some extra magic with these registers, I might be running a fault prone setup at the moment, but for now there have been no symptoms of anything going seriously wrong. --jau --------------D0B50E7E8E81236165F464C6 Content-Type: text/plain; charset=UTF-8; name="ppc32-ppc64-sprg-registers.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ppc32-ppc64-sprg-registers.txt" SPRG0 - SPRG3 are 64-bit or 32-bit registers, depending on the type of PowerPC processor. They are provided for general operating system use, such as performing a fast state save or for supporting multiprocessor implementations Table 2-19. Conventional Uses of SPRG0 - SPRG3 Register Description SPRG0 Software may load a unique physical address in this register to identify an area of memory reserved for use by the first-level exception handler. This area must be unique for each processor in the system. SPRG1 This register may be used as a scratch register by the first-level exception handler to save the content of a GPR. That GPR then can be loaded from SPRG0 and used as a base register to save other GPRs to memory. SPRG2 This register may be used by the operating system as needed. SPRG3 This register may be used by the operating system as needed. --------------D0B50E7E8E81236165F464C6--