All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] am33xx: Correct NON_SECURE_SRAM_START/END
Date: Fri, 31 May 2013 22:56:52 +0200	[thread overview]
Message-ID: <87hahix3zf.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <1370024339-28355-2-git-send-email-trini@ti.com> (Tom Rini's message of "Fri, 31 May 2013 14:18:58 -0400")

>>>>> "Tom" == Tom Rini <trini@ti.com> writes:

 Tom> Prior to Sricharan's cleanup of the boot parameter saving code, we
 Tom> did not make use of NON_SECURE_SRAM_START on am33xx, so it wasn't a
 Tom> problem that the address was pointing to the middle of our running SPL.
 Tom> Correct to point to the base location of the download image area.
 Tom> Increase CONFIG_SPL_TEXT_BASE to account for this scratch area being
 Tom> used.  As part of correcting these tests, make use of the fact that
 Tom> we've always been placing our stack outside of the download image area
 Tom> (which is fine, once the downloaded image is run, ROM is gone) so
 Tom> correct the max size test to be the ROM defined top of the download area
 Tom> to where we link/load at.

 Tom> Signed-off-by: Tom Rini <trini@ti.com>
 Tom> ---
 Tom>  arch/arm/include/asm/arch-am33xx/omap.h |    4 ++--
 Tom>  include/configs/am335x_evm.h            |   10 ++++++++--
 Tom>  include/configs/igep0033.h              |   10 ++++++++--
 Tom>  include/configs/pcm051.h                |   10 ++++++++--
 Tom>  4 files changed, 26 insertions(+), 8 deletions(-)

 Tom> diff --git a/arch/arm/include/asm/arch-am33xx/omap.h b/arch/arm/include/asm/arch-am33xx/omap.h
 Tom> index 7e3bb9c..db15159 100644
 Tom> --- a/arch/arm/include/asm/arch-am33xx/omap.h
 Tom> +++ b/arch/arm/include/asm/arch-am33xx/omap.h
 Tom> @@ -29,8 +29,8 @@
 Tom>   * at 0x40304000(EMU base) so that our code works for both EMU and GP
 Tom>   */
 Tom>  #ifdef CONFIG_AM33XX
 Tom> -#define NON_SECURE_SRAM_START	0x40304000
 Tom> -#define NON_SECURE_SRAM_END	0x4030E000
 Tom> +#define NON_SECURE_SRAM_START	0x402F0400
 Tom> +#define NON_SECURE_SRAM_END	0x40310000
 Tom>  #elif defined(CONFIG_TI814X)
 Tom>  #define NON_SECURE_SRAM_START	0x40300000
 Tom>  #define NON_SECURE_SRAM_END	0x40320000
 Tom> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
 Tom> index f019134..a4777c7 100644
 Tom> --- a/include/configs/am335x_evm.h
 Tom> +++ b/include/configs/am335x_evm.h
 Tom> @@ -305,8 +305,14 @@
 Tom>  /* Defines for SPL */
 Tom>  #define CONFIG_SPL
 Tom>  #define CONFIG_SPL_FRAMEWORK
 Tom> -#define CONFIG_SPL_TEXT_BASE		0x402F0400
 Tom> -#define CONFIG_SPL_MAX_SIZE		(101 * 1024)
 Tom> +/*
 Tom> + * Place the image at the start of the ROM defined image space and leave
 Tom> + * space for SRAM scratch entries (see arch/arm/include/omap_common.h).
 Tom> + * We limit our size to the ROM-defined dowloaded image area, and use the

s/dowloaded/downloaded/


 Tom> + * rest of the space for stack.
 Tom> + */
 Tom> +#define CONFIG_SPL_TEXT_BASE		0x402F0500
 Tom> +#define CONFIG_SPL_MAX_SIZE		(0x4030C000 - CONFIG_SPL_TEXT_BASE)
 Tom>  #define CONFIG_SPL_STACK		CONFIG_SYS_INIT_SP_ADDR
 
 Tom>  #define CONFIG_SPL_BSS_START_ADDR	0x80000000
 Tom> diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h
 Tom> index 1912d7d..dd26d9c 100644
 Tom> --- a/include/configs/igep0033.h
 Tom> +++ b/include/configs/igep0033.h
 Tom> @@ -214,8 +214,14 @@
 Tom>  /* Defines for SPL */
 Tom>  #define CONFIG_SPL
 Tom>  #define CONFIG_SPL_FRAMEWORK
 Tom> -#define CONFIG_SPL_TEXT_BASE		0x402F0400
 Tom> -#define CONFIG_SPL_MAX_SIZE		(101 * 1024)
 Tom> +/*
 Tom> + * Place the image at the start of the ROM defined image space and leave
 Tom> + * space for SRAM scratch entries (see arch/arm/include/omap_common.h).
 Tom> + * We limit our size to the ROM-defined dowloaded image area, and use the

s/dowloaded/downloaded/


 Tom> + * rest of the space for stack.
 Tom> + */
 Tom> +#define CONFIG_SPL_TEXT_BASE		0x402F0500
 Tom> +#define CONFIG_SPL_MAX_SIZE		(0x4030C000 - CONFIG_SPL_TEXT_BASE)
 Tom>  #define CONFIG_SPL_STACK		CONFIG_SYS_INIT_SP_ADDR
 
 Tom>  #define CONFIG_SPL_BSS_START_ADDR	0x80000000
 Tom> diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
 Tom> index 478f805..a7d01f1 100644
 Tom> --- a/include/configs/pcm051.h
 Tom> +++ b/include/configs/pcm051.h
 Tom> @@ -204,8 +204,14 @@
 Tom>  /* Defines for SPL */
 Tom>  #define CONFIG_SPL
 Tom>  #define CONFIG_SPL_FRAMEWORK
 Tom> -#define CONFIG_SPL_TEXT_BASE		0x402F0400
 Tom> -#define CONFIG_SPL_MAX_SIZE		(101 * 1024)
 Tom> +/*
 Tom> + * Place the image at the start of the ROM defined image space and leave
 Tom> + * space for SRAM scratch entries (see arch/arm/include/omap_common.h).
 Tom> + * We limit our size to the ROM-defined dowloaded image area, and use the

s/dowloaded/downloaded/

Otherwise it looks good.

Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2013-05-31 20:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 18:18 [U-Boot] [PATCH 1/3] omap-common/hwinit-common.c: Mark omap_rev_string as static Tom Rini
2013-05-31 18:18 ` [U-Boot] [PATCH 2/3] am33xx: Correct NON_SECURE_SRAM_START/END Tom Rini
2013-05-31 20:56   ` Peter Korsgaard [this message]
2013-06-01 13:23     ` Tom Rini
2013-05-31 18:18 ` [U-Boot] [PATCH 3/3] am33xx/omap: Move save_omap_boot_params to omap-common/boot-common.c Tom Rini
2013-06-03  6:51   ` Sricharan R

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=87hahix3zf.fsf@dell.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.