Page 1 of 1
Developing for PowerPC
Posted: Sun Feb 15, 2004 2:37 pm
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?
Re:Developing for PowerPC
Posted: Sun Feb 15, 2004 2:45 pm
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
Re:Developing for PowerPC
Posted: Mon Feb 16, 2004 2:27 am
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...
Re:Developing for PowerPC
Posted: Mon Feb 16, 2004 3:03 am
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.
Re:Developing for PowerPC
Posted: Mon Feb 16, 2004 5:35 am
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 ...
Re:Developing for PowerPC
Posted: Mon Feb 16, 2004 5:49 am
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 ...
Re:Developing for PowerPC
Posted: Mon Feb 16, 2004 5:52 am
by Solar
This is not exactly "frequently asked", but seldom answered, and thus I added it to the
FAQ (PowerPC).
Re:Developing for PowerPC
Posted: Mon Feb 16, 2004 5:57 am
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 ...
Re:Developing for PowerPC
Posted: Mon Feb 16, 2004 7:05 am
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?
Re:Developing for PowerPC
Posted: Mon Feb 16, 2004 2:27 pm
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.