From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] m28evk: Use GENERATED_GBL_DATA_SIZE
Date: Mon, 2 Apr 2012 06:17:01 +0200 [thread overview]
Message-ID: <201204020617.01681.marex@denx.de> (raw)
In-Reply-To: <1325165738-9155-1-git-send-email-festevam@gmail.com>
Dear Fabio Estevam,
I think this patch is wrong ... did I ack this one?
> Use GENERATED_GBL_DATA_SIZE for calculating CONFIG_SYS_INIT_SP_OFFSET.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> include/configs/m28evk.h | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
> index 39c841f..2b4871e 100644
> --- a/include/configs/m28evk.h
> +++ b/include/configs/m28evk.h
> @@ -92,7 +92,14 @@
> #define CONFIG_SYS_MEMTEST_END 0x40400000 /* 4 MB RAM test
*/
> #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
> /* Point initial SP in SRAM so SPL can use it too. */
> -#define CONFIG_SYS_INIT_SP_ADDR 0x00002000
> +
> +#define CONFIG_SYS_INIT_RAM_ADDR 0x00002000
This 0x2000 is wrong, it should be 0x0. Otherwise your maths below overflow and
SP is located at 0x21f80.
> +#define CONFIG_SYS_INIT_RAM_SIZE (128 * 1024)
> +
> +#define CONFIG_SYS_INIT_SP_OFFSET \
> + (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
> +#define CONFIG_SYS_INIT_SP_ADDR \
> + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
> /*
> * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
> * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
Best regards,
Marek Vasut
prev parent reply other threads:[~2012-04-02 4:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 13:35 [U-Boot] [PATCH] m28evk: Use GENERATED_GBL_DATA_SIZE Fabio Estevam
2011-12-29 15:22 ` Marek Vasut
2011-12-29 15:38 ` Fabio Estevam
2011-12-29 15:47 ` Stefano Babic
2011-12-29 18:22 ` Marek Vasut
2012-01-04 13:53 ` Stefano Babic
2012-04-02 4:17 ` Marek Vasut [this message]
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=201204020617.01681.marex@denx.de \
--to=marex@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