linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC] powerpc/boot: add kernel,end node to the cuboot target
@ 2008-09-23 19:54 Sebastian Siewior
  2008-09-23 22:28 ` Kumar Gala
  2008-09-24  1:24 ` Milton Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Sebastian Siewior @ 2008-09-23 19:54 UTC (permalink / raw)
  To: linuxppc-dev

this could be used by the kexec userland code.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
---
This is done by the 64bit kexec code allready. The 32bit doesn't use the
device tree at all. I'm not sure whether the node has to be a 32bit or
64bit value.

 arch/powerpc/boot/main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c
index 27f6af1..a8714cf 100644
--- a/arch/powerpc/boot/main.c
+++ b/arch/powerpc/boot/main.c
@@ -27,7 +27,7 @@ struct addr_range {
 
 #undef DEBUG
 
-static struct addr_range prep_kernel(void)
+static struct addr_range prep_kernel(void *chosen)
 {
 	char elfheader[256];
 	void *vmlinuz_addr = _vmlinux_start;
@@ -72,7 +72,7 @@ static struct addr_range prep_kernel(void)
 		fatal("ran out of data!  only got 0x%x of 0x%lx bytes.\n\r",
 				len, ei.loadsize);
 	printf("done 0x%x bytes\n\r", len);
-
+	setprop_val(chosen, "linux,kernel-end", (u32)(ei.memsize));
 	flush_cache(addr, ei.loadsize);
 
 	return (struct addr_range){addr, ei.memsize};
@@ -180,7 +180,7 @@ void start(void)
 	if (!chosen)
 		chosen = create_node(NULL, "chosen");
 
-	vmlinux = prep_kernel();
+	vmlinux = prep_kernel(chosen);
 	initrd = prep_initrd(vmlinux, chosen,
 			     loader_info.initrd_addr, loader_info.initrd_size);
 	prep_cmdline(chosen);
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-10-01  5:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-23 19:54 [RFC] powerpc/boot: add kernel,end node to the cuboot target Sebastian Siewior
2008-09-23 22:28 ` Kumar Gala
2008-09-25  8:50   ` Sebastian Siewior
2008-09-24  1:24 ` Milton Miller
2008-09-25  9:43   ` Sebastian Siewior
2008-09-29 20:04   ` Sebastian Siewior
2008-09-30  7:44     ` Milton Miller
2008-09-30 17:21       ` Sebastian Siewior
2008-10-01  5:33         ` Milton Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).