Specifications

14.3.4. Linux kernel register usage
For the Power Architecture® architecture, the Linux kernel uses the following registers:
R1:
stack pointer
R2:
pointer to task_struct for the current task
R3-R4:
parameter passing and return values
R5-R10:
parameter passing
R13:
small data area pointer
R30:
GOT pointer
R31:
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 linuxppc-embedded@lists.linuxppc.org ].
See also the (E)ABI specifications for the Power Architecture® architecture, Developing PowerPC Embedded
Application Binary Interface (EABI) Compliant Programs
14.3.5. Linux Kernel Ignores my bootargs
Question:
Why doesn't the kernel use the command-line options I set in the "bootargs" environment variable in
U-Boot when I boot my target system?
Answer:
This problem is typical for ARM systems only. The following discussion is ARM-centric:
First, check to ensure that you have configured your U-Boot build so that CONFIG_CMDLINE_TAG
is enabled. (Other tags like CONFIG_SETUP_MEMORY_TAGS or CONFIG_INITRD_TAG may be
needed, too.) This ensures that u-boot will boot the kernel with a command-line tag that incorporates
the kernel options you set in the "bootargs" environment variable.
If you have the CONFIG_CMDLINE_TAG option configured, the problem is almost certainly with
your kernel build. You have to instruct the kernel to pick up the boot tags at a certain address. This is
done in the machine descriptor macros, which are found in the processor start-up C code for your
architecture. For the Intel DBPXA250 "Lubbock" development board, the machine descriptor
macros are located at the bottom of the file arch/arm/mach-pxa/lubbock.c, and they look
like this:
MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform")
MAINTAINER("MontaVista Software Inc.")
BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
FIXUP(fixup_lubbock)
MAPIO(lubbock_map_io)
INITIRQ(lubbock_init_irq)
14.3.5. Linux Kernel Ignores my bootargs 176