grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PPC stack


From: Hollis Blanchard
Subject: Re: PPC stack
Date: Thu, 7 Apr 2005 22:55:00 -0500

On Apr 7, 2005, at 3:48 PM, Marco Gerards wrote:

Hollis Blanchard <address@hidden> 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, address@hidden
        ori   1, 1, address@hidden

-Hollis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]