Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2007 10:13:21 -0400
From:      "Stephane E. Potvin" <sepotvin@videotron.ca>
To:        grehan@freebsd.org
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: Cell port
Message-ID:  <46F28001.2030205@videotron.ca>
In-Reply-To: <46E03D3E.8060504@freebsd.org>
References:  <E79BC169-E7E8-4CA2-95E8-FC806777714E@decpp.net> <46DCD1DA.5090301@freebsd.org> <42C14314-D3EC-460E-97D9-53830FB9CBF6@decpp.net> <46E03D3E.8060504@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Grehan wrote:
> Hi Décio,
> 
>> If you have the spare time to produce a detailed checklist of what 
>> needs to be done and provide some guidance as required, I'm willing to 
>> put the effort to see this port through.
> 
>  Here's my thoughts:
> 
>  - the Cell CPU is 64-bit whilst FreeBSD/ppc is 32-bit. I don't think 
> the Cell has the 'bridge mode' features that the G5 (aka 970) has, so 
> the MMU would have to use a segment table. Doing it this way is probably 
> a good thing since it would allow ports to other 64-bit PPC's (e.g. the 
> PA-Semi).
>   A full 64-bit port of FreeBSD is a large undertaking, and not really 
> necessary for the PS3 which doesn't have a lot of RAM.
> 
>  - the IBM Cell simulator would be the best place to start. It's 
> OpenFirmware-based so the existing OFW code may be usable. This would 
> allow the generic PPC code, such as vector and MMU processing, to get 
> sorted out in an environment that allows easy debug.
> 
>  - For the PS3, the first step would be to get the FreeBSD loader 
> ported, either directly booted from the hypervisor (similar to how kboot 
> works), or to get kboot to load it using kexec. For the latter, kboot 
> itself could be modified, or the loader could be built to look like a 
> linux/ppc kernel.
> 
>  - the existing FreeBSD/ppc code is heavily dependent on OpenFirmware. 
> For running on the PS3, this dependency would have to be removed.
> 
>  - the PS3 hypervisor interface would need to be extracted from Linux 
> source code. I've seen some preliminary attempts at documenting the 
> hypervisor on a gaming site, but I think you would have to dig through 
> source. This also brings up the issue of GPL contamination: you DO NOT 
> want to use Linux source code, but only use it as a reference.
> 
>  Probably lots of other things I've forgotten or more likely don't know 
> about, but that should get you started.
> 

Small comment about the OpenFirmware dependency. Recent Linux kernels 
started to required that all powerpc platforms provide what they call a 
"flattened device tree" which is very similar to an OpenFirmware device 
tree. It enables them to share the same code for standard Apple 
computers providing an OpenFirmware and small embedded processors (like 
the 8349e from FSL) that do not usually have OpenFirmware.

It might be worthwhile for anybody attempting to port to a new 
architecture to look into adding support for something similar instead 
of removing the OF dependency.

Just $0.02 ;) Ignore if it doesn't make any sense...

Steph



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46F28001.2030205>