PowerPC is a big-endian, RISC, 64-bit architecture with 32-bit implementations. 32-bit PPC userland binaries run without modification on 64-bit processors.
The Linux kernel has run on all POWER/PowerPC processors since the year 2000. It is usually the primary software enablement target for PowerPC semiconductor vendors.
A PowerPC core is at the heart of the Cell processor, and Linux runs on it. Cell information can be found in the following forms:
- Barcelona Supercomputing Center: SDK, documentation
- IBM developerWorks: articles, downloads, web forums
- cbe-oss-dev: the mailing list for Open Source development
- irc.oftc.net #cell: IRC channel
Free non-root SSH access to PowerPC Linux systems is provided by the following hosts:
- Oregon State University Open Source Labs
- SourceForge.net compile farm
- University of Augsburg Debian on PowerPC
- Linux on Power @ Peking University
Many PowerPC systems, including PowerMacintosh and IBM pSeries and RS/6000, use closed-source Open Firmware implementations. Open Firmware provides a powerful Forth-based environment for debugging and boot. The OpenBIOS project has a more organized collection of Open Firmware documentation.
(In Linux, the Open Firmware device tree is viewable beneath /proc/device-tree, and the lsprop tool makes browsing more friendly.)
There are a range of other firmwares available for PowerPC, especially because of the variety of PowerPC embedded systems:
- PIBS (PowerPC Initialization and Boot Software)
- SLOF (Slimline Open Firmware)
PowerPC kernels are moving towards requiring a small Open Firmware-style device tree as the only means of passing information from bootloaders/firmware to the kernel. This does not require a full Open Firmware implementation. DTC (Device Tree Compiler) is a tool to create a static device tree, which is adequate for most embedded systems (since their topology will not vary across reboots). DTC is available via a git tree: git://www.jdl.com/software/dtc.git .
PowerPC Linux developers can be found on the #mklinux irc channel, and they have their very own mailing list too. Patches sent to that mailing list are conveniently tracked in a web-based patch tracker.
In addition, embedded PowerPC Linux developers have some places of their own.
Although historically PowerPC-specific code was very slow to get into the main kernel trees, these days the official trees should be up-to-date for most (non-embedded) users. However, there are still architecture-specific trees:
Compiler & Toolchain
The latest GNU toolchain releases tend to work as well for ppc32 and ppc64 as for any architecture. If you’re interested in cross-compiling, see our short guide to crosstool.
If you would like a ppc64 toolchain, please read the ppc64 toolchain information.
The processor-specific glibc optimization project started with optimizations for memcpy, memcmp, and memset on POWER4 and POWER5. It is an extensible framework, ready for all sorts of other optimizations and for other processors. Also relevent to this area are some PowerPC glibc memory benchmarks, comparing the memory throughput of various copying routines in particular as related to MySQL.
The decimal-floating point glibc add-on enables decimal floating point on all architectures, including PowerPC.
There are a few simulators usable for PowerPC Linux development, and some are even open source. An IBM developerWorks article gives a brief overview of the open source options:
Closed-source yet freely available options include:
Here are some quick links to tools and resources for performance analysis on PowerPC Linux:
Altivec is the Motorola trademark for a technology jointly developed with Apple and IBM (which IBM calls VMX and Apple calls Velocity Engine). It is a Single Instruction Multiple Data (SIMD) instruction set which can process certain types of data much faster than the ordinary CPU instructions can. Altivec is present in Motorola 74xx and IBM 970 processors.
- Introduction to Altivec: Ten Easy Ways to Vectorize Your Code
- Unrolling AltiVec: part 1, part 2, part 3
- TCP/IP checksum vectorization using AltiVec: part 1, part 2
- Apple’s Velocity Engine information
- Freescale’s AltiVec information
- SIMDtech.org: home to Altivec mailing lists and information
- fftw.org: Altivec-optimized Fast Fourier Transform
- libmotovec: Freescale Altivec-optimized library
- libfreevec: LGPL-licensed library of Altivec-optimized libc functions
See above for information on Altivec.
- Introduction to PowerPC assembly
- PowerPC Assembly Programming on the Mac Mini
- Emulation and cross-development for PowerPC
- Embedded System HOWTO
- Power Instruction Set Architecture, version 2.03 (free registration required)
- PowerPC Architecture, version 2.02 (no registration required)
- Programming Environments Manual (PEM): technical reference
- PowerPC Compiler Writer’s Guide (assembly tricks)
Application Binary Interface (ABI) Manuals
- ppc32 ABI — the ABI actually implemented by PPC32 Linux
- System V R4 ABI, PowerPC edition — 32-bit PowerPC SVR4 ABI
- 64-bit PowerPC ABI
- 64-bit PowerPC ELF ABI Supplement plus VMX (AltiVec™)
- ppcperflib: a performance-optimized library for IBM 4xx processors (BSD license)
- libaltivec for 74xx and maybe 970 processors
- fftw.org, a library implementing optimized Fast Fourier Transforms for many architectures, including 74xx and 970.