Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1DJnaw-0000Gx-RG for mharc-grub-devel@gnu.org; Fri, 08 Apr 2005 03:07:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DJnat-0000FR-LM for grub-devel@gnu.org; Fri, 08 Apr 2005 03:07:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DJnar-0000EK-20 for grub-devel@gnu.org; Fri, 08 Apr 2005 03:07:54 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJnaq-0000Cp-TL for grub-devel@gnu.org; Fri, 08 Apr 2005 03:07:52 -0400 Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DJnzn-0005db-MI for grub-devel@gnu.org; Fri, 08 Apr 2005 03:33:39 -0400 Received: from [209.86.89.64] (helo=smtpauth04.mail.atl.earthlink.net) by mx20.gnu.org with esmtp (Exim 4.34) id 1DJkmq-0000AN-Kk for grub-devel@gnu.org; Fri, 08 Apr 2005 00:08:04 -0400 Received: from [63.246.184.80] (helo=[192.168.0.101]) by smtpauth04.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1DJkmd-0005gv-9E for grub-devel@gnu.org; Fri, 08 Apr 2005 00:07:51 -0400 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <87hdiil3dl.fsf@student.han.nl> References: <87hdiil3dl.fsf@student.han.nl> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Hollis Blanchard Date: Thu, 7 Apr 2005 22:55:00 -0500 To: The development of GRUB 2 X-Mailer: Apple Mail (2.619.2) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec79e071f0038bfd2e9914e5f890e5b52f1f350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 63.246.184.80 Subject: Re: PPC stack X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2005 07:07:56 -0000 On Apr 7, 2005, at 3:48 PM, Marco Gerards wrote: > Hollis Blanchard writes: > >> Marco, can you remind me why we stopped assigning our own stack on >> PPC? I seem to recall something failing, but I don't remember what. > > IIRC it was because OF supplies a stack anyway and because GRUB did > not work on the pegasos because of that. Yeah, I'm still curious why. >> I've found that some things work better when we use our own stack. For >> example, running "suspend" does not spew a bunch of OF messages to the >> screen, but rather quietly returns to the OF prompt. Also, I think the >> trap exception doesn't work (crashes OF) when we use the OF-assigned >> stack, but I will try to investigate more later. > > Please do. If you want me to set stuff on the pegasos or powerbook, > just ask. Hmm... Now I can't reproduce the effects I was seeing. By using the "suspend" command, I can see that Apple's firmware-assigned stack is about 32KB above the modules' LOAD segment, which looks a little tight when viewing hex but should be plenty. On Pegasos, could you do this: grub> suspend 0 > .registers ... and see what the value of R1 is? Also compare to the addesses used in the LOAD segments of the ELF file (readelf --segments). Adding these two lines to the very top of _start will use our stack again. 'nm grubof | grep init_stack' will tell us what value the stack will have (and we can then wonder why Pegasos doesn't like it). lis 1, init_stack@h ori 1, 1, init_stack@l -Hollis