Skip to main content.

14.3.4. Linux kernel register usage

For the Power Architecture architecture, the Linux kernel uses the following registers:

stack pointer
pointer to task_struct for the current task
parameter passing and return values
parameter passing
small data area pointer
GOT pointer
frame pointer

A function can use r0 and r3 - r12 without saving and restoring them. r13 - r31 have to be preserved so they must be saved and restored when you want to use them. Also, cr2 - cr4 must be preserved, while cr0, cr1, cr5 - cr7, lr, ctr and xer can be used without saving & restoring them. [ Posted Tue, 15 Jul 2003 by Paul Mackerras to ].

See also the (E)ABI specifications for the Power Architecture architecture, Developing PowerPC Embedded Application Binary Interface (EABI) Compliant Programs

14.3.3. Linux Post Mortem Analysis 1. Abstract 14.3.5. Linux Kernel Ignores my bootargs
Prev Home Next