From: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] spl: add Kconfig option to clear bss early
Date: Tue, 12 Mar 2019 21:52:23 +0100 [thread overview]
Message-ID: <de4fa367-07f4-9637-beae-2156eb1afbb7@gmail.com> (raw)
In-Reply-To: <ed35540a-dee6-91d0-00b5-dcdbb3fbd42b@denx.de>
Am 12.03.2019 um 07:02 schrieb Stefan Roese:
> Hi Simon,
>
> On 11.03.19 22:35, Simon Goldschmidt wrote:
>> This introduces a new Kconfig option SPL_CLEAR_BSS_F. If enabled, it clears
>> the bss before calling board_init_f() instead of clearing it before calling
>> board_init_r().
>>
>> This also ensures that variables placed in BSS can be shared between
>> board_init_f() and board_init_r() in SPL.
>>
>> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>> ---
>>
>> common/spl/Kconfig | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
>> index 206c24076d..5da8697994 100644
>> --- a/common/spl/Kconfig
>> +++ b/common/spl/Kconfig
>> @@ -156,6 +156,17 @@ config SPL_STACK_R_MALLOC_SIMPLE_LEN
>> to give board_init_r() a larger heap then the initial heap in
>> SRAM which is limited to SYS_MALLOC_F_LEN bytes.
>>
>> +config SPL_CLEAR_BSS_F
>> + bool "Clear BSS section before calling board_init_f"
>> + help
>> + The BSS section is initialized to zero. In SPL, this is normally done
>> + before calling board_init_r().
>> + For platforms using BSS in board_init_f() already, enable this to
>> + clear the BSS section before calling board_init_f() instead of
>> + clearing it before calling board_init_r(). This also ensures that
>> + variables placed in BSS can be shared between board_init_f() and
>> + board_init_r().
>> +
>
> You should probably depend this option on "ARM", as your implementation
> is currently only for this arch. Otherwise users might expect this to
> work on other platforms as well.
Hmm, ok. I thought it might be worth leaving this visible for everyone.
But you're right that people migh rely on this to work where it's not
implemented...
I'll add that dependency in v2.
Regards,
Simon
next prev parent reply other threads:[~2019-03-12 20:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 21:35 [U-Boot] [PATCH 0/6] spl: full-featured heap cleanups Simon Goldschmidt
2019-03-11 21:35 ` [U-Boot] [PATCH 1/6] spl: add Kconfig option to clear bss early Simon Goldschmidt
2019-03-12 6:02 ` Stefan Roese
2019-03-12 20:52 ` Simon Goldschmidt [this message]
2019-03-11 21:35 ` [U-Boot] [PATCH 2/6] spl: arm: implement SPL_CLEAR_BSS_F Simon Goldschmidt
2019-03-11 21:35 ` [U-Boot] [PATCH 3/6] dlmalloc: fix malloc range at end of ram Simon Goldschmidt
2019-03-11 21:35 ` [U-Boot] [PATCH 4/6] dlmalloc: be compatible to tiny printf Simon Goldschmidt
2019-03-11 21:35 ` [U-Boot] [PATCH 5/6] spl: support using full malloc with SYS_MALLOC_F_LEN Simon Goldschmidt
2019-03-19 1:24 ` Simon Glass
2019-03-19 18:52 ` Simon Goldschmidt
2019-03-11 21:35 ` [U-Boot] [PATCH 6/6] arm: socfpga: a10: move SPL stack size to Kconfig Simon Goldschmidt
2019-03-18 7:45 ` Chee, Tien Fong
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=de4fa367-07f4-9637-beae-2156eb1afbb7@gmail.com \
--to=simon.k.r.goldschmidt@gmail.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