From: Sebastian Siewior <bigeasy@linutronix.de>
To: linuxppc-dev@ozlabs.org
Subject: [RFC] powerpc/boot: add kernel,end node to the cuboot target
Date: Tue, 23 Sep 2008 21:54:04 +0200 [thread overview]
Message-ID: <20080923195404.GA10935@www.tglx.de> (raw)
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
next reply other threads:[~2008-09-23 19:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 19:54 Sebastian Siewior [this message]
2008-09-23 22:28 ` [RFC] powerpc/boot: add kernel,end node to the cuboot target 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080923195404.GA10935@www.tglx.de \
--to=bigeasy@linutronix.de \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).