PPC stack
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
Quoted 2 lines · Hollis Blanchard
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.
Quoted 5 lines
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
Quoted 7 lines · Marco Gerards
Quoted 2 lines · Hollis Blanchard
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.
Quoted 8 lines
Quoted 5 lines
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