From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JFTim-0002a5-N1 for mharc-grub-devel@gnu.org; Thu, 17 Jan 2008 07:19:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFTil-0002Zr-9d for grub-devel@gnu.org; Thu, 17 Jan 2008 07:19:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFTij-0002Ze-ND for grub-devel@gnu.org; Thu, 17 Jan 2008 07:19:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFTij-0002Zb-HO for grub-devel@gnu.org; Thu, 17 Jan 2008 07:19:45 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JFTij-0002lv-AW for grub-devel@gnu.org; Thu, 17 Jan 2008 07:19:45 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JFTig-0000br-7C for grub-devel@gnu.org; Thu, 17 Jan 2008 13:19:44 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JFTh1-0000gZ-2b for grub-devel@gnu.org; Thu, 17 Jan 2008 13:17:59 +0100 Date: Thu, 17 Jan 2008 13:17:59 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080117121758.GA2399@thorin> References: <20080113191251.GA9050@thorin> <20080115200824.GA2881@thorin> <20080117025433.ez1grtxjdcc4ckgk@webmail.spamcop.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080117025433.ez1grtxjdcc4ckgk@webmail.spamcop.net> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: help with powerpc asm (moving grub_ieee1275_entry_fn initialization to crt0.S) 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: Thu, 17 Jan 2008 12:19:47 -0000 On Thu, Jan 17, 2008 at 02:54:33AM -0500, Pavel Roskin wrote: > Quoting Robert Millan : > > >Here's an incomplete (missing powerpc & sparc) version of the patch that > >would sanitize this function call. > > I don't see why it needs to be done across the board. Maybe you have > further simplifications in mind? What do you mean? The problem I find is that forcing this to be the third parameter of cmain makes it look like cmain has been adapted to accomodate for this particular cpu. Another option would be to have just one param. This would be the cleanest on i386, since the call from OFW already uses -mregparm=1 for the callback address, but I don't know about powerpc. > By the way, please don't remove the declaration of cmain(). It may be > useful to prevent a gcc warning (missing declaration). cmain() is > really an rare case that doesn't need a declaration, since it's not > called by any C code, but gcc doesn't know that. Ah yes. Right. > --- a/kern/powerpc/ieee1275/crt0.S > +++ b/kern/powerpc/ieee1275/crt0.S > @@ -38,5 +38,9 @@ _start: > 2: stwu 2, 4(6) /* We know r2 is already 0 from above. */ > bdnz 2b > > + /* Store r5 in grub_ieee1275_entry_fn */ > + lis 9, grub_ieee1275_entry_fn@ha > + stw 5, grub_ieee1275_entry_fn@l(9) I thought you'd also need to remove stuff. Isn't there code above this that pushes the 3 parameters onto the stack? -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.)