Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e658118 authored by Olaf Hering's avatar Olaf Hering Committed by Paul Mackerras
Browse files

[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: default avatarOlaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 67a1b682
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -54,5 +54,6 @@ clear_caches:
	sync
	isync

	mr	r6,r1
	b	start
+2 −2
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ static unsigned long try_claim(unsigned long size)
	return addr;
}

void start(unsigned long a1, unsigned long a2, void *promptr)
void start(unsigned long a1, unsigned long a2, void *promptr, void *sp)
{
	unsigned long i;
	int len;
@@ -151,7 +151,7 @@ void start(unsigned long a1, unsigned long a2, void *promptr)
	if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4)
		exit();

	printf("\n\rzImage starting: loaded at 0x%lx\n\r", (unsigned long) _start);
	printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", _start, sp);

	/*
	 * The first available claim_base must be above the end of the