[Cbe-oss-dev] BSD loader port to PS3

Geoff Levand geoffrey.levand at am.sony.com
Thu Nov 8 03:16:28 EST 2007


Hi,

Edward O'Callaghan wrote:
> Dear All,
> 
> I am working porting the BSD loader to the PS3 and while doing so I am
> having problems finding the right docs on how the Linux Kernel/kboot
> bootstraps.
> Could you please give me a overview of how this is so or the relevant
> docs/code to that I can figure it out.
> Also; Do you know what the requirements of kboot/kexec are on ELF image
> layout, where it will put the loader in memory, what the context is on
> handoff etc ?

We have two kernel entry types for PS3, which we call 1st stage and 2nd stage.
1st stage kernels are programmed into flash memory, and 2nd stage kernels are
loaded via kexec.  It seems you are asking about the 2nd stage entry, in other
words, kboot loads your BSD kernel image.

There is nothing very ps3 specific for a 2nd stage entry, it just follows the
standard powerpc method outlined here:

  http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/powerpc/booting-without-of.txt

The 2nd stage linux kernel entry is at the symbol __start, defined in arch/powerpc/kernel/head_64.S.

You can study the kexec application sources to find how it works:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools-testing.git
  http://www.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools-testing.git

Good Luck.

-Geoff





More information about the cbe-oss-dev mailing list