From: David Gibson <hidden> Date: 2007-03-15 04:29:04
At present, the zImage entry code passes a copy of the stack pointer
to the start() function. There's no real reason for this; the only
thing start() does with it is print it out. It appears to be a
leftover debugging hack, so, this patch removes it.
Signed-off-by: David Gibson <redacted>
---
As requested, a cleanup for this wart. Please apply.
Index: working-2.6/arch/powerpc/boot/crt0.S
===================================================================
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: Tony Breeds <hidden> Date: 2007-03-15 04:35:46
On Thu, Mar 15, 2007 at 03:29:04PM +1100, David Gibson wrote:
At present, the zImage entry code passes a copy of the stack pointer
to the start() function. There's no real reason for this; the only
thing start() does with it is print it out. It appears to be a
leftover debugging hack, so, this patch removes it.
@@ -268,8 +268,7 @@ void start(void *sp)if(platform_ops.fixups)platform_ops.fixups();-printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r",-_start,sp);+printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r",_start);
Shouldn't that be:
+ printf("\n\rzImage starting: loaded at 0x%p\n\r", _start);
or similar?
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
From: David Gibson <hidden> Date: 2007-03-15 05:18:21
On Thu, Mar 15, 2007 at 03:35:46PM +1100, Tony Breeds wrote:
On Thu, Mar 15, 2007 at 03:29:04PM +1100, David Gibson wrote:
quoted
At present, the zImage entry code passes a copy of the stack pointer
to the start() function. There's no real reason for this; the only
thing start() does with it is print it out. It appears to be a
leftover debugging hack, so, this patch removes it.
@@ -268,8 +268,7 @@ void start(void *sp)if(platform_ops.fixups)platform_ops.fixups();-printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r",-_start,sp);+printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r",_start);
Shouldn't that be:
+ printf("\n\rzImage starting: loaded at 0x%p\n\r", _start);
or similar?
Crap, yes, I suck.
Fixed version coming, plus a patch to turn on gcc printf format
warnings for the zImage.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: Olaf Hering <hidden> Date: 2007-03-16 18:37:51
On Thu, Mar 15, David Gibson wrote:
At present, the zImage entry code passes a copy of the stack pointer
to the start() function. There's no real reason for this; the only
thing start() does with it is print it out. It appears to be a
leftover debugging hack, so, this patch removes it.
Signed-off-by: David Gibson <redacted>
NACK.
It helps to determine the firmware memory layout.
On Fri, 2007-03-16 at 19:37 +0100, Olaf Hering wrote:
On Thu, Mar 15, David Gibson wrote:
quoted
At present, the zImage entry code passes a copy of the stack pointer
to the start() function. There's no real reason for this; the only
thing start() does with it is print it out. It appears to be a
leftover debugging hack, so, this patch removes it.
Signed-off-by: David Gibson <redacted>
NACK.
It helps to determine the firmware memory layout.
How, why is that useful, and where is that ever used?
josh
From: Olaf Hering <hidden> Date: 2007-03-16 20:04:52
On Fri, Mar 16, Josh Boyer wrote:
How, why is that useful, and where is that ever used?
prom_init runs with the stack passed from the firmware (unless that
changed in since 2.6.13). Its better to know where the stack is when
looking at early boot bugreports.