All of lore.kernel.org
 help / color / mirror / Atom feed
* PPC stack
@ 2005-04-07 15:42 Hollis Blanchard
  2005-04-07 20:48 ` Marco Gerards
  0 siblings, 1 reply; 3+ messages in thread
From: Hollis Blanchard @ 2005-04-07 15:42 UTC (permalink / raw)
  To: The development of GRUB 2

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.

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.

-Hollis



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PPC stack
  2005-04-07 15:42 PPC stack Hollis Blanchard
@ 2005-04-07 20:48 ` Marco Gerards
  2005-04-08  3:55   ` Hollis Blanchard
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Gerards @ 2005-04-07 20:48 UTC (permalink / raw)
  To: The development of GRUB 2

Hollis Blanchard <hollis@penguinppc.org> 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.

> 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.

--
Marco




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PPC stack
  2005-04-07 20:48 ` Marco Gerards
@ 2005-04-08  3:55   ` Hollis Blanchard
  0 siblings, 0 replies; 3+ messages in thread
From: Hollis Blanchard @ 2005-04-08  3:55 UTC (permalink / raw)
  To: The development of GRUB 2

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

> Hollis Blanchard <hollis@penguinppc.org> 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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-08  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-07 15:42 PPC stack Hollis Blanchard
2005-04-07 20:48 ` Marco Gerards
2005-04-08  3:55   ` Hollis Blanchard

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.