From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] ARM: fix CONFIG_SPL_MAX_SIZE semantics
Date: Mon, 8 Apr 2013 23:43:37 +0200 (CEST) [thread overview]
Message-ID: <626694845.1367591.1365457417729.JavaMail.root@advansee.com> (raw)
In-Reply-To: <1365451109-22030-5-git-send-email-albert.u.boot@aribaud.net>
Hi Albert,
On Monday, April 8, 2013 9:58:29 PM, Albert ARIBAUD wrote:
> The ASSERT() in arch/arm/cpu/u-boot.lds is unneeded as
> this linker file is not used for SPL builds. Remove it.
>
> The ASSERT() in arch/arm/cpu/u-boot-spl.lds is wrong
> as it compares image+BSS size to max image size only.
> Split it in two distinct ASSERT()s, one for image size,
> one for BSS size.
>
> Finally, update README regarding the (now homogeneous)
> semantics of the CONFIG_SPL_MAX_SIZE and
> CONFIG_SPL_BSS_MAX_SIZE macros.
>
> Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> ---
> README | 17 +++++++++++++++--
> arch/arm/cpu/u-boot-spl.lds | 10 ++++++++--
> arch/arm/cpu/u-boot.lds | 4 ----
> 3 files changed, 23 insertions(+), 8 deletions(-)
>
> diff --git a/README b/README
> index a35ef31..c902421 100644
> --- a/README
> +++ b/README
> @@ -2784,7 +2784,14 @@ FIT uImage format:
> LDSCRIPT for linking the SPL binary.
>
> CONFIG_SPL_MAX_SIZE
> - Maximum binary size (text, data and rodata) of the SPL binary.
> + Maximum size for the image (sum of the text, data, rodata
> + and linker lists sections) of the SPL executable.
> + When defined, linker checks that the actual image size does
> + not exceed it.
> + The total amount of memory used by the SPL when running is
> + equal CONFIG_SPL_MAX_SIZE, plus CONFIG_SPL_BSS_MAX_SIZE if
> + it exists.
> + Note: image and BSS are disjoint for some targets.
>
> CONFIG_SPL_TEXT_BASE
> TEXT_BASE for linking the SPL binary.
> @@ -2797,7 +2804,13 @@ FIT uImage format:
> Link address for the BSS within the SPL binary.
>
> CONFIG_SPL_BSS_MAX_SIZE
> - Maximum binary size of the BSS section of the SPL binary.
> + Maximum size of the BSS section of the SPL executable.
> + When defined, linker checks that the actual BSS size does
> + not exceed it.
> + The total amount of memory used by the SPL when running is
> + equal CONFIG_SPL_MAX_SIZE, plus CONFIG_SPL_BSS_MAX_SIZE if
> + it exists.
> + Note: image and BSS are disjoint for some targets.
>
> CONFIG_SPL_STACK
> Adress of the start of the stack SPL will use
> diff --git a/arch/arm/cpu/u-boot-spl.lds b/arch/arm/cpu/u-boot-spl.lds
> index 3c0d99c..89ef9ce 100644
> --- a/arch/arm/cpu/u-boot-spl.lds
> +++ b/arch/arm/cpu/u-boot-spl.lds
> @@ -88,6 +88,12 @@ SECTIONS
> /DISCARD/ : { *(.gnu*) }
> }
>
> -#if defined(CONFIG_SPL_TEXT_BASE) && defined(CONFIG_SPL_MAX_SIZE)
> -ASSERT(__bss_end < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image
> too big");
> +#if defined(CONFIG_SPL_MAX_SIZE)
> +ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
The possible relocation and MMU data is also part of the binary image file, so
that would be __bss_start rather than __image_copy_end above, and README should
be updated to reflect this.
> + "SPL image too big");
> +#endif
> +
> +#if defined(CONFIG_SPL_BSS_MAX_SIZE)
> +ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS MAX_SIZE), \
> + "SPL image BSS too big");
> #endif
> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
> index 3a1083d..7bbc4f5 100644
> --- a/arch/arm/cpu/u-boot.lds
> +++ b/arch/arm/cpu/u-boot.lds
> @@ -101,7 +101,3 @@ SECTIONS
> /DISCARD/ : { *(.interp*) }
> /DISCARD/ : { *(.gnu*) }
> }
> -
> -#if defined(CONFIG_SPL_TEXT_BASE) && defined(CONFIG_SPL_MAX_SIZE)
> -ASSERT(__bss_end < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image
> too big");
> -#endif
> --
> 1.7.10.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Best regards,
Beno?t
next prev parent reply other threads:[~2013-04-08 21:43 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 19:58 [U-Boot] [PATCH 0/4] Homogeneize semantics of CONFIG_SPL_MAX_SIZE Albert ARIBAUD
2013-04-08 19:58 ` [U-Boot] [PATCH 1/4] cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics Albert ARIBAUD
2013-04-08 19:58 ` [U-Boot] [PATCH 2/4] da850evm, da840_am18xxevm: " Albert ARIBAUD
2013-04-08 19:58 ` [U-Boot] [PATCH 3/4] smdk5250, snow: " Albert ARIBAUD
2013-04-08 19:58 ` [U-Boot] [PATCH 4/4] ARM: " Albert ARIBAUD
2013-04-08 21:43 ` Benoît Thébaudeau [this message]
2013-04-09 14:23 ` Albert ARIBAUD
2013-04-09 14:24 ` Benoît Thébaudeau
2013-04-09 17:43 ` Albert ARIBAUD
2013-04-09 17:39 ` Benoît Thébaudeau
2013-04-08 20:43 ` [U-Boot] [U-Boot, 1/4] cam_enc_4xx: " Tom Rini
2013-04-09 6:50 ` Heiko Schocher
2013-04-09 9:08 ` Albert ARIBAUD
2013-04-09 12:11 ` Heiko Schocher
2013-04-09 12:42 ` Albert ARIBAUD
2013-04-09 13:17 ` Heiko Schocher
2013-04-09 14:11 ` Albert ARIBAUD
2013-04-09 23:14 ` [U-Boot] [PATCH v2 0/4] Homogeneize semantics of CONFIG_SPL_MAX_SIZE Albert ARIBAUD
2013-04-09 23:14 ` [U-Boot] [PATCH v2 1/4] cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics Albert ARIBAUD
2013-04-09 23:14 ` [U-Boot] [PATCH v2 2/4] da850evm, da850_am18xxevm: " Albert ARIBAUD
2013-04-09 23:14 ` [U-Boot] [PATCH v2 3/4] smdk5250, snow: " Albert ARIBAUD
2013-04-09 23:14 ` [U-Boot] [PATCH v2 4/4] ARM: " Albert ARIBAUD
2013-04-10 22:21 ` Stephen Warren
2013-04-10 22:50 ` Albert ARIBAUD
2013-04-10 23:09 ` Stephen Warren
2013-04-11 14:30 ` Albert ARIBAUD
2013-04-11 16:51 ` Albert ARIBAUD
2013-04-10 23:09 ` Albert ARIBAUD
2013-04-10 23:16 ` Stephen Warren
2013-04-11 14:32 ` Albert ARIBAUD
2013-04-11 16:08 ` Tom Rini
2013-04-11 16:14 ` Stephen Warren
2013-04-10 2:01 ` [U-Boot] [PATCH v2 3/4] smdk5250, snow: " Minkyu Kang
2013-04-10 7:55 ` [U-Boot] [PATCH v2 1/4] cam_enc_4xx: " Heiko Schocher
2013-04-10 23:10 ` [U-Boot] [PATCH v2 0/4] Homogeneize semantics of CONFIG_SPL_MAX_SIZE Albert ARIBAUD
2013-04-11 16:52 ` Albert ARIBAUD
2013-04-12 11:55 ` [U-Boot] [PATCH v3 " Albert ARIBAUD
2013-04-12 12:37 ` Tom Rini
2013-04-12 15:14 ` [U-Boot] [PATCH v4 " Albert ARIBAUD
2013-04-12 15:14 ` [U-Boot] [PATCH v4 1/4] ARM: fix CONFIG_SPL_MAX_SIZE semantics Albert ARIBAUD
2013-04-12 15:14 ` [U-Boot] [PATCH v4 2/4] cam_enc_4xx: convert to CONFIG_SPL_MAX_FOOTPRINT Albert ARIBAUD
2013-04-12 15:14 ` [U-Boot] [PATCH v4 3/4] da850evm, da850_am18xxevm: " Albert ARIBAUD
2013-04-12 15:14 ` [U-Boot] [PATCH v4 4/4] smdk5250, snow: " Albert ARIBAUD
2013-04-12 15:30 ` [U-Boot] [PATCH v4 1/4] ARM: fix CONFIG_SPL_MAX_SIZE semantics Tom Rini
2013-04-12 16:22 ` Albert ARIBAUD
2013-04-14 14:10 ` [U-Boot] [PATCH v4 0/4] Homogeneize semantics of CONFIG_SPL_MAX_SIZE Albert ARIBAUD
2013-04-14 14:15 ` Benoît Thébaudeau
2013-04-14 14:29 ` Albert ARIBAUD
2013-04-12 12:05 ` [U-Boot] [PATCH v3 1/4] cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics Albert ARIBAUD
2013-04-12 12:05 ` [U-Boot] [PATCH v3 2/4] da850evm, da850_am18xxevm: " Albert ARIBAUD
2013-04-12 12:05 ` [U-Boot] [PATCH v3 3/4] smdk5250, snow: " Albert ARIBAUD
2013-04-12 12:05 ` [U-Boot] [PATCH v3 4/4] ARM: " Albert ARIBAUD
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=626694845.1367591.1365457417729.JavaMail.root@advansee.com \
--to=benoit.thebaudeau@advansee.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 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.