Not sure if this is the right place to ask, but I'd like to clarify my understanding of being booted by open firmware.
As I understand it, the address open firmware expects me to call will be in r5 when my executable is entered, and when I call, the call record for open firmware (pointed to by r3) contains these basic areas:
Code:
addr thing
0 "open" # Pointer to name of method to call (asciiz)
4 number of arguments
8 number of returns
12 args ... (to n = 12 + 4 * number-of-arguments)
n returns
Open firmware expects to be called by blrl, with return address in r0.
And that the BAT and segment registers must be as they were when i was called initially.
My question is, is the above sufficient to make an open firmware call given most PPC openfirmware versions?
Additionally, netbsd boot code contains a firmworksbugs option that's quite complicated (it seems that the biggest problem is that this OF implementation starts with TLB miss exceptions on). Assuming that I want to load an elf binary on some newworld macs and more modern hardware, do I need a similar hack? Does this bug persist in firmware sold now?
Sorry for being a bit of a newbie ...
arty