From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] armv7:omap4-common: Correct check of the SPL image size
Date: Wed, 28 Aug 2013 10:40:32 -0400 [thread overview]
Message-ID: <20130828144032.GD17898@bill-the-cat> (raw)
In-Reply-To: <1374674524-26188-1-git-send-email-Oleg.Kosheliev@ti.com>
On Wed, Jul 24, 2013 at 05:02:04PM +0300, Oleg Kosheliev wrote:
> From: Oleg_Kosheliev <oleg.kosheliev@ti.com>
>
> The u-boot-spl image must be stored in SRAM at
> addresses from 0x40300000 till 0x4030bfff.
> Higher than that area is located the ROM code stack.
> Thus we should check that the highest address
> of the SPL image is not in the stack area or higher.
> In this patch CONFIG_SPL_MAX_SIZE is corrected based
> on the max allowed for SPL image address.
>
> Signed-off-by: Oleg Kosheliev <oleg.kosheliev@ti.com>
> ---
> include/configs/omap4_common.h | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
> index 2fa4382..aeeef6c 100644
> --- a/include/configs/omap4_common.h
> +++ b/include/configs/omap4_common.h
> @@ -266,7 +266,14 @@
> #define CONFIG_SPL
> #define CONFIG_SPL_FRAMEWORK
> #define CONFIG_SPL_TEXT_BASE 0x40304350
> -#define CONFIG_SPL_MAX_SIZE (38 * 1024)
> +/*
> + * The allowed space in SRAM for SPL is from 0x40300000 till 0x4030bfff.
> + * The space above 0x4030c000 is used by ROM code stack
> + * and this area must not be rewritten by the SPL
Note that we are allowed to use the public stack area (and should, for
our scratch space) but must not exceed the download image area of
0x40300000 - 0x4030bfff. See include/configs/ti_armv7_common.h for how
the comment should look. And if you have time, please convert the OMAP4
platforms to use ti_armv7_common.h
> +#define CONFIG_SPL_MAX_ADDR 0x4030bfff
> +#define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_MAX_ADDR - \
> + CONFIG_SPL_TEXT_BASE)
Just say:
#define CONFIG_SPL_MAX_SIZE (0x4030C000 - \
CONFIG_SPL_TEXT_BASE)
> #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR
> #define CONFIG_SPL_DISPLAY_PRINT
We need to change things like in
http://patchwork.ozlabs.org/patch/268511/ including changing the scratch
area.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130828/d343d3bf/attachment.pgp>
next prev parent reply other threads:[~2013-08-28 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 14:02 [U-Boot] [RFC PATCH] armv7:omap4-common: Correct check of the SPL image size Oleg Kosheliev
2013-08-28 14:40 ` Tom Rini [this message]
2013-09-02 7:56 ` Lokesh Vutla
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=20130828144032.GD17898@bill-the-cat \
--to=trini@ti.com \
--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