Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] ppc64 boot: print firmware provided stackpointer

Show firmware provided stackpointer during boot.

This helps to find the "taboo" areas on the various boards. claim tends to
fail for these memory areas, but some jokers return success anyway.

Use %p to print the load address, its a pointer.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Olaf Hering and committed by
Paul Mackerras
7e658118 67a1b682

+3 -2
+1
arch/ppc64/boot/crt0.S
··· 54 54 sync 55 55 isync 56 56 57 + mr r6,r1 57 58 b start 58 59
+2 -2
arch/ppc64/boot/main.c
··· 131 131 return addr; 132 132 } 133 133 134 - void start(unsigned long a1, unsigned long a2, void *promptr) 134 + void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) 135 135 { 136 136 unsigned long i; 137 137 int len; ··· 151 151 if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4) 152 152 exit(); 153 153 154 - printf("\n\rzImage starting: loaded at 0x%lx\n\r", (unsigned long) _start); 154 + printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", _start, sp); 155 155 156 156 /* 157 157 * The first available claim_base must be above the end of the