public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] igep00x0: Use all SRAM available for SPL.
Date: Wed, 27 Apr 2016 09:23:49 +0200	[thread overview]
Message-ID: <57206905.7030401@denx.de> (raw)
In-Reply-To: <CAFqH_53HN+ds=xhk05Fvd37o1y0ieJTO6YyuYSex78NTmpuofA@mail.gmail.com>

Hello Enric,

Am 27.04.2016 um 09:00 schrieb Enric Balletbo Serra:
> Hi Heiko,
>
> 2016-04-27 6:25 GMT+02:00 Heiko Schocher <hs at denx.de <mailto:hs@denx.de>>:
>  > Hello Enric,
>  >
>  > Am 26.04.2016 um 17:05 schrieb Enric Balletbo i Serra:
>  >>
>  >> Internal SRAM starts at 0x40200000 and ends at 0x4020FFFF, so there
>  >> are 64KB available to be used for SPL. This will also help some
>  >> compilers to fit all the code into the allocated space.
>  >>
>  >> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com
> <mailto:enric.balletbo@collabora.com>>
>  >> ---
>  >>   include/configs/omap3_igep00x0.h | 7 +++++++
>  >>   1 file changed, 7 insertions(+)
>  >>
>  >> diff --git a/include/configs/omap3_igep00x0.h
>  >> b/include/configs/omap3_igep00x0.h
>  >> index 5da50a5..2459064 100644
>  >> --- a/include/configs/omap3_igep00x0.h
>  >> +++ b/include/configs/omap3_igep00x0.h
>  >> @@ -19,6 +19,13 @@
>  >>   #include <configs/ti_omap3_common.h>
>  >>   #include <asm/mach-types.h>
>  >>
>  >> +/* SRAM starts at 0x40200000 and ends at 0x4020FFFF (64KB) */
>  >> +#undef CONFIG_SPL_MAX_SIZE
>  >> +#undef CONFIG_SPL_TEXT_BASE
>  >> +
>  >> +#define CONFIG_SPL_MAX_SIZE            (64*1024)
>  >> +#define CONFIG_SPL_TEXT_BASE           0x40200000
>  >
>  >
>  > Hmm... risky, as the SPL needs at last some bytes for stack, until
>  > RAM is initialized and stack moved to it ... or do I miss something?
>  >
>
> This is what I thought, orginally I thought
>
>    CONFIG_SPL_MAX_SIZE            (60*1024) /* 4KB for stack */
>
> But then I saw that overo and logic boards set
>
>    CONFIG_SPL_MAX_SIZE    (64 * 1024)
>
> I send this version just to have some discussion. So, can we say that overo and logic boards are
> incorrect too (or at least risky)? And, Tom proposed a 4KB stack, do you think it's enough?

I would say risky. How many stack you need, depends on what tasks SPL
has to do ...

May you try to move the stack into RAM?
Then you need less then 4k for the initial stack in SPL ...

You may want to look into:
CONFIG_SPL_STACK_R_ADDR
CONFIG_SPL_STACK_R

defines ...

bye,
Heiko
>
> Regards,
>   Enric
>
>  > bye,
>  > Heiko
>  > --
>  > DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
>  > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>  >
>  > _______________________________________________
>  > U-Boot mailing list
>  > U-Boot at lists.denx.de <mailto:U-Boot@lists.denx.de>
>  > http://lists.denx.de/mailman/listinfo/u-boot

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2016-04-27  7:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 15:05 [U-Boot] [PATCH] igep00x0: Use all SRAM available for SPL Enric Balletbo i Serra
2016-04-27  4:25 ` Heiko Schocher
2016-04-27  7:00   ` Enric Balletbo Serra
2016-04-27  7:23     ` Heiko Schocher [this message]
2016-04-27 13:36 ` Tom Rini

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=57206905.7030401@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /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