Developing for PowerPC

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
chris

Developing for PowerPC

Post by chris »

I find very little info on developing an OS for the PowerPC architecture and was wondering how it would be done with such a lack of information. Also, how does it differ from x86? Would it be like learning OS dev from the start again?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Developing for PowerPC

Post by Pype.Clicker »

there are good books on the PowerPC architecture (including MMU and stuff) and i have the chance to own one (i'll lookup the ISBN at work) ... They're harder to find because they're less demand for it.

btw http://www-3.ibm.com/chips/techlib/tech ... pages/main gave almost an immediate hit in g00gle
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Developing for PowerPC

Post by Solar »

The PowerPC CPU architecture is significantly different from the IA32. Yet still, the architecture of your OS need not differ too much: While the way you address memory on the lowest levels might be different, or the way your SIMD unit operates, you still have a bootloader, a scheduler, a dispatcher, a memory manager etc. etc.

You will be able to transcribe most of the documentation 1:1 to the PowerPC, unless they handle the low levels (interrupt handling, real vs. protected mode etc.).

For the low levels, you'll of course need Motorola (or IBM) docs. The Motorola ones are found by www.motorola.com / semiconductors / products / 32bit embedded processors / PowerPC / (make your pick) / Documentation.

And yes, Motorola *does* send out hardcopies of their docs. (I have the PowerPC docs on my bookshelf, right next to the Intel ones. ;-) )

Remember that the CPU docs won't suffice. You also need info on the motherboard / chipset etc. - and that's where it gets tricky, since Apple doesn't like giving away that information...
Every good solution is obvious once you've found it.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Developing for PowerPC

Post by Pype.Clicker »

i know there's a Linux-on-PPC project ... maybe this would be the right place to look for PowerPC info

Code: Select all

/usr/src/linux/arch/ppc/boot/prep/head.S
/*
 * Boot loader philosophy:
 *      ROM loads us to some arbitrary location
 *      Move the boot code to the link address (8M)
 *      Call decompress_kernel()
 *         Relocate the initrd, zimage and residual data to 8M
 *         Decompress the kernel to 0
 *      Jump to the kernel entry
 *            -- Cort
 */

http://penguinppc.org/ looks like a neat place to start.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Developing for PowerPC

Post by Pype.Clicker »

http://bootrom.apple.com/ and http://www.openfirmware.org/ looks interresting too ...

Afaik, the BIOS in Apple Macintosh is named "open Firmware". Extension cards and other hardware of the like that are OpenFirmware compliant should carry a Forth-written initialisation code in their ROM. I suppose the main boot rom then scan memory for such ROMs and then interprete the FORTH code on them.

http://www.firmworks.com/www/ofw.htm -- What is Open Firmware

the Common Hardware Reference Platform document looks like being a valuable friend aswell ...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Developing for PowerPC

Post by Pype.Clicker »

i dunno how it sounds for you, but browsing through this document really give me the feeling that apple has yeears of technological advance over the PC architecture ...
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Developing for PowerPC

Post by Solar »

This is not exactly "frequently asked", but seldom answered, and thus I added it to the FAQ (PowerPC).
Every good solution is obvious once you've found it.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Developing for PowerPC

Post by Pype.Clicker »

hum ... make sure the links i provided are relevant first, though ... i haven't read all those myself: just got a glance at 'm and S'dTFW. The OpenFirmware standard docs looks like being available commercially, but i haven't found a PDF for them so far ...
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Developing for PowerPC

Post by Solar »

Better irrelevant links than none... ;D

As I haven't done anything on / for the PowerPC yet, I'm hardly a judge, so I followed the 'ole Wiki rule: Dump first, edit later.

chris, mayhaps you want to tell us which of the links actually helped you?
Every good solution is obvious once you've found it.
chris

Re:Developing for PowerPC

Post by chris »

Thanks alot for your reply's :). I havn't had alot of time on my hands to be browsing around lately but this stuff is cool, although I'm not sure if I'd write my os for PPC first as x86 is so popular.
Post Reply