Booting OS on PowerPC
Segher Boessenkool
segher at kernel.crashing.org
Sun Dec 11 07:04:13 EST 2005
>> Can any body tell me how Linux boot on PowerPC machine
>> when Open Firmware is up. To be more preciese, what is
>> the "known-environment" that the OS expect from Open
>> Firmware.
>
> It expects to be (1) in 32-bit mode, (2) r3, r4 0, (3) r5 is a pointer
> to the client interface callback, (4) r1 is a usable stack, (5) image
> is loaded according to elf-header of zImage wrapper.
Not quite right, but close...
32-bit mode: if the ELF file OF loaded is 32-bit, it will be started in
32-bit mode; if instead it is a 64-bit ELF file, it will be started in
64-bit mode. Analogous for other binary formats.
GPR1 points to an initialized stack, at least 32kB in size.
GPR2 is zero.
GPR3 and GPR4 are reserved for the platform binding.
GPR5 is the client interface entry point.
GPR6 and GPR7 are the address and the length of an array of bytes, the
use of which is platform dependent, typically some boot parameters
(although the normal "kernel command line string" is passed in the
"bootargs" property in /chosen, instead).
Segher
More information about the Linuxppc64-dev
mailing list