[U-Boot] [PATCHv1 15/22] arm: socfpga: spl: add relocate_stack_to_sdram to lowlevel_init.S

Marek Vasut
2015-01-16T00:48:58Z

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