From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 16 Jan 2015 01:48:58 +0100 Subject: [U-Boot] [PATCHv1 15/22] arm: socfpga: spl: add relocate_stack_to_sdram to lowlevel_init.S In-Reply-To: <54B8565B.9090409@opensource.altera.com> References: <1421253662-27222-1-git-send-email-dinguyen@opensource.altera.com> <201501152300.47024.marex@denx.de> <54B8565B.9090409@opensource.altera.com> Message-ID: <201501160148.59054.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, January 16, 2015 at 01:07:55 AM, Dinh Nguyen wrote: Hi! > >>> which should be plenty, right? If moving the stack to SDRAM is really > >>> needed, then you might want to use the common stack relocation code > >>> (see relocate_code() function). Also, you should thoroughly describe > >>> the reason in the commit message, in this case it's really important. > >> > >> I'll update in v2. > > > > So uh, what's the reason for moving the stack into the SDRAM anyway > > please ? > > I think this is needed to be able to support SPL_FAT_LOAD. Loading from FAT shouldn't consume that much stack. I think you should be able to use JTAG debugger and trace the stack utilisation in the functions defined in files under fs/fat/ , which should give you some idea how much the FAT loading consumes. In case there really is some spike in the stack utilization, such spike should be identified and fixed instead. I also believe that in case we manage to avoid moving the stack to SDRAM, we avoid a lot of code which is possibly fragile and that's always nice. Would you please be able to look into this stack utilization issue in more depth ? Thank you! Best regards, Marek Vasut