From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, 1/4] cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics
Date: Tue, 09 Apr 2013 08:50:26 +0200 [thread overview]
Message-ID: <5163BA32.2020702@denx.de> (raw)
In-Reply-To: <20130408204353.GP5729@bill-the-cat>
Hello Tom,
Am 08.04.2013 22:43, schrieb Tom Rini:
> On Mon, Apr 08, 2013 at 09:58:26AM -0000, Albert ARIBAUD wrote:
>
>> CONFIG_SPL_MAX_SIZE wrongly included BSS size. Split
>> max size between image and BSS based on sizes reported
>> for current build.
>>
>> Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
>>
>> ---
>> board/ait/cam_enc_4xx/u-boot-spl.lds | 2 +-
>> include/configs/cam_enc_4xx.h | 4 +++-
>> 2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/board/ait/cam_enc_4xx/u-boot-spl.lds b/board/ait/cam_enc_4xx/u-boot-spl.lds
>> index dd9d52d..25625dc 100644
>> --- a/board/ait/cam_enc_4xx/u-boot-spl.lds
>> +++ b/board/ait/cam_enc_4xx/u-boot-spl.lds
>> @@ -25,7 +25,7 @@
>> */
>>
>> MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
>> - LENGTH = CONFIG_SPL_MAX_SIZE }
>> + LENGTH = (CONFIG_SPL_MAX_SIZE + CONFIG_SPL_BSS_MAX_SIZE) }
>>
>> OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
>> OUTPUT_ARCH(arm)
>> diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
>> index 56528dd..df3682b 100644
>> --- a/include/configs/cam_enc_4xx.h
>> +++ b/include/configs/cam_enc_4xx.h
>> @@ -230,7 +230,9 @@
>> #define CONFIG_SPL_STACK (0x00010000 + 0x7f00)
>>
>> #define CONFIG_SPL_TEXT_BASE 0x00000020 /*CONFIG_SYS_SRAM_START*/
>> -#define CONFIG_SPL_MAX_SIZE 12320
>> +/* SPL max size is 12K -- but --pad-to requires a single decimal number */
>> +#define CONFIG_SPL_MAX_SIZE 12288
>> +#define CONFIG_SPL_BSS_MAX_SIZE (4*1024)
>
> This is wrong, you've just increased the overall limit to 16K. I know
> there's a reason that current limit is so exact, Heiko? And also, this
The cam_enc_4xx use only 12k for the SPL code. This is defined in the
UBL header, see u-boot:doc/README.davinci.nand_spl, but can be adapted
for this board. The SoC has an IRam of 32K - ~2k for RBL stack, see:
http://www.ti.com/lit/gpn/tms320dm368
I have no access anymore to this HW to do some tests :-( so I looked
into the hexdump of the current u-boot code with your patch applied, and
the code on the interesting borders (0x0, 0x800 and 0x3800) looks good
to me ...
> shows the conceptual problem I have (and 2/2 has the same, along with
> tegra). The important limit is the combined size. It doesn't matter if
> it's 11K text/data/rodata and 1K BSS, or 8+4. When using custom linker
> scripts, we avoid this and can just comment overall (which would need
> adding here) that we only care about the combined size. But then tegra
> would be wrong since it uses the generic arm spl linker script?
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2013-04-09 6:50 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
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 [this message]
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=5163BA32.2020702@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