From patchwork Tue Aug 7 22:28:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Martin X-Patchwork-Id: 175810 X-Patchwork-Delegate: twarren@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D19772C00AE for ; Wed, 8 Aug 2012 08:29:11 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5969628160; Wed, 8 Aug 2012 00:29:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tRqJMcn4gdYp; Wed, 8 Aug 2012 00:29:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D235428161; Wed, 8 Aug 2012 00:29:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B9A4A28161 for ; Wed, 8 Aug 2012 00:29:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3UmHzBERgTsN for ; Wed, 8 Aug 2012 00:29:03 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from hqemgate04.nvidia.com (hqemgate04.nvidia.com [216.228.121.35]) by theia.denx.de (Postfix) with ESMTPS id 0539A28160 for ; Wed, 8 Aug 2012 00:29:01 +0200 (CEST) Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate04.nvidia.com id ; Tue, 07 Aug 2012 15:28:18 -0700 Received: from hqemhub01.nvidia.com ([172.17.108.22]) by hqnvupgp08.nvidia.com (PGP Universal service); Tue, 07 Aug 2012 15:28:58 -0700 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 07 Aug 2012 15:28:58 -0700 Received: from nvidia.com (172.20.144.16) by hqemhub01.nvidia.com (172.20.150.30) with Microsoft SMTP Server (TLS) id 8.3.264.0; Tue, 7 Aug 2012 15:28:57 -0700 Date: Tue, 7 Aug 2012 15:28:41 -0700 From: Allen Martin To: Lucas Stach Message-ID: <20120807222841.GK7791@nvidia.com> References: <1344298788-7059-1-git-send-email-dev@lynxeye.de> <502149B0.8020904@wwwdotorg.org> <1344359340.1477.12.camel@tellur> <20120807174329.GI7791@nvidia.com> <1344361980.1477.18.camel@tellur> MIME-Version: 1.0 In-Reply-To: <1344361980.1477.18.camel@tellur> User-Agent: Mutt/1.5.21 (2010-09-15) Content-Disposition: inline Cc: "u-boot@lists.denx.de" , Tom Warren Subject: Re: [U-Boot] [PATCH] tegra20: add back USE_PRIVATE_LIBGCC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de On Tue, Aug 07, 2012 at 10:53:00AM -0700, Lucas Stach wrote: > Hi Allen, > > And to answer Tom's question: the failure was that the real U-Boot would > not come up after the SPL. All I could see was the one line printed by > the SPL and nothing more. I think I found the problem. It's the following code from start.S: ENTRY(cpu_init_crit) /* * Jump to board specific initialization... * The Mask ROM will have already initialized * basic memory. Go here to bump up clock rate and handle * wake up conditions. */ mov ip, lr @ persevere link reg across call bl lowlevel_init @ go setup pll,mux,memory mov lr, ip @ restore link mov pc, lr @ back to my caller ENDPROC(cpu_init_crit) The "ip" register is not preserved across function calls, and the CodeSourcery compiler is using it in lowlevel_init or one of the functions it calls. This code was there before the SPL changes, but wasn't being called because CONFIG_SKIP_LOWLEVEL_INIT was set, but now it isn't. Lucas, can you try the following change? I tested it on seaboard with CodeSourcery arm-2011.09-70-arm-none-linux-gnueabi and I'm able to boot a kernel. Tom if this works we probably want to get it into your pull request to Albert. CodeSourcery toolchain is probably used by a lot of people. -Allen Tested-by: Lucas Stach diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 2506f27..02e47fa 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -152,7 +152,7 @@ reset: /* the mask ROM code should have PLL and others stable */ #ifndef CONFIG_SKIP_LOWLEVEL_INIT bl cpu_init_cp15 - bl cpu_init_crit + bl lowlevel_init @ go setup pll,mux,memory #endif /* Set stackpointer in internal RAM to call board_init_f */ @@ -339,29 +339,6 @@ ENTRY(cpu_init_cp15) mov pc, lr @ back to my caller ENDPROC(cpu_init_cp15) -#ifndef CONFIG_SKIP_LOWLEVEL_INIT -/************************************************************************* - * - * CPU_init_critical registers - * - * setup important registers - * setup memory timing - * - *************************************************************************/ -ENTRY(cpu_init_crit) - /* - * Jump to board specific initialization... - * The Mask ROM will have already initialized - * basic memory. Go here to bump up clock rate and handle - * wake up conditions. - */ - mov ip, lr @ persevere link reg across -call - bl lowlevel_init @ go setup pll,mux,memory - mov lr, ip @ restore link - mov pc, lr @ back to my caller -ENDPROC(cpu_init_crit) -#endif - #ifndef CONFIG_SPL_BUILD /* *************************************************************************