aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/main.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-03-22 02:02:21 -0400
committerPaul Mackerras <paulus@samba.org>2007-03-26 01:11:20 -0400
commite5a2072bd48eb4a35c57a8ec45897ac2db3a3f82 (patch)
tree8ee71ecb846416925a3e5796a8f66626db0c6513 /arch/powerpc/boot/main.c
parentfae59c39e885148acf42320fe0d4ebf4cb3e9231 (diff)
[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.c5
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 @@
17#include "ops.h" 17#include "ops.h"
18#include "gunzip_util.h" 18#include "gunzip_util.h"
19#include "flatdevtree.h" 19#include "flatdevtree.h"
20#include "reg.h"
20 21
21extern char _start[]; 22extern char _start[];
22extern char __bss_start[]; 23extern char __bss_start[];
@@ -247,7 +248,7 @@ struct dt_ops dt_ops;
247struct console_ops console_ops; 248struct console_ops console_ops;
248struct loader_info loader_info; 249struct loader_info loader_info;
249 250
250void start(void *sp) 251void start(void)
251{ 252{
252 struct addr_range vmlinux, initrd; 253 struct addr_range vmlinux, initrd;
253 kernel_entry_t kentry; 254 kernel_entry_t kentry;
@@ -260,7 +261,7 @@ void start(void *sp)
260 platform_ops.fixups(); 261 platform_ops.fixups();
261 262
262 printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", 263 printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r",
263 _start, sp); 264 _start, get_sp());
264 265
265 vmlinux = prep_kernel(); 266 vmlinux = prep_kernel();
266 initrd = prep_initrd(vmlinux, loader_info.initrd_addr, 267 initrd = prep_initrd(vmlinux, loader_info.initrd_addr,