From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: help with powerpc asm (moving grub_ieee1275_entry_fn initialization to crt0.S)
Date: Thu, 17 Jan 2008 13:17:59 +0100 [thread overview]
Message-ID: <20080117121758.GA2399@thorin> (raw)
In-Reply-To: <20080117025433.ez1grtxjdcc4ckgk@webmail.spamcop.net>
On Thu, Jan 17, 2008 at 02:54:33AM -0500, Pavel Roskin wrote:
> Quoting Robert Millan <rmh@aybabtu.com>:
>
> >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
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
next prev parent reply other threads:[~2008-01-17 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-13 19:12 help with powerpc asm (moving grub_ieee1275_entry_fn initialization to crt0.S) Robert Millan
2008-01-15 20:08 ` Robert Millan
2008-01-17 7:54 ` Pavel Roskin
2008-01-17 12:17 ` Robert Millan [this message]
2008-01-17 17:30 ` Pavel Roskin
2008-01-17 19:11 ` Robert Millan
2008-01-17 20:08 ` Pavel Roskin
2008-01-19 11:40 ` Robert Millan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080117121758.GA2399@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.