From patchwork Tue Sep 23 19:54:04 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 1165 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 67B20DE69F for ; Wed, 24 Sep 2008 05:54:28 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from www.tglx.de (www.tglx.de [62.245.132.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F2017DE1FC for ; Wed, 24 Sep 2008 05:54:12 +1000 (EST) Received: from www.tglx.de (www.tglx.de [127.0.0.1]) by www.tglx.de (8.13.8/8.13.8/TGLX-2007100201) with ESMTP id m8NJs4eW011997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Sep 2008 21:54:04 +0200 Received: (from bigeasy@localhost) by www.tglx.de (8.13.8/8.13.8/Submit) id m8NJs4WB011996 for linuxppc-dev@ozlabs.org; Tue, 23 Sep 2008 21:54:04 +0200 Date: Tue, 23 Sep 2008 21:54:04 +0200 From: Sebastian Siewior To: linuxppc-dev@ozlabs.org Subject: [RFC] powerpc/boot: add kernel,end node to the cuboot target Message-ID: <20080923195404.GA10935@www.tglx.de> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Key-Id: 97C4700B X-Key-Fingerprint: 09E2 D1F3 9A3A FF13 C3D3 961C 0688 1C1E 97C4 700B X-Virus-Scanned: ClamAV 0.93.2/8314/Tue Sep 23 02:50:20 2008 on www.tglx.de X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on www.tglx.de X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org this could be used by the kexec userland code. Signed-off-by: Sebastian Siewior --- 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);