diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-03-22 17:02:21 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-26 15:11:20 +1000 |
commit | e5a2072bd48eb4a35c57a8ec45897ac2db3a3f82 (patch) | |
tree | 8ee71ecb846416925a3e5796a8f66626db0c6513 /arch/powerpc/boot/main.c | |
parent | fae59c39e885148acf42320fe0d4ebf4cb3e9231 (diff) | |
download | blackbird-op-linux-e5a2072bd48eb4a35c57a8ec45897ac2db3a3f82.tar.gz blackbird-op-linux-e5a2072bd48eb4a35c57a8ec45897ac2db3a3f82.zip |
[POWERPC] New reg.h for the zImage
This patch adds a reg.h to the zImage code, with common definitions
for accessing system registers. For now, this includes functions for
retrieving the PVR and the stack pointer. This patch then uses the
new reg.h to let start() display the running stack address without
having to explicitly pass the stack as a parameter from the asm code.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/main.c')
-rw-r--r-- | arch/powerpc/boot/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 33c73295acf3..e1df8feaf16d 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c @@ -17,6 +17,7 @@ #include "ops.h" #include "gunzip_util.h" #include "flatdevtree.h" +#include "reg.h" extern char _start[]; extern char __bss_start[]; @@ -247,7 +248,7 @@ struct dt_ops dt_ops; struct console_ops console_ops; struct loader_info loader_info; -void start(void *sp) +void start(void) { struct addr_range vmlinux, initrd; kernel_entry_t kentry; @@ -260,7 +261,7 @@ void start(void *sp) platform_ops.fixups(); printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", - _start, sp); + _start, get_sp()); vmlinux = prep_kernel(); initrd = prep_initrd(vmlinux, loader_info.initrd_addr, |