From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5] arm: Fix clear bss loop for zero length bss
Date: Wed, 30 Nov 2011 21:13:13 +0100 [thread overview]
Message-ID: <4ED68E59.2000402@aribaud.net> (raw)
In-Reply-To: <1322564285-6911-1-git-send-email-christian.riesch@omicron.at>
Hi Christian,
Le 29/11/2011 11:58, Christian Riesch a ?crit :
> This patch fixes the clear bss loop for bss sections that have
> zero length, i.e., where __bss_start == __bss_end__.
Just out of curiosity, did you actually hit a scenario when you had a
really empty BSS? Not that I intend to reject this patch because of
this, mind.
> Signed-off-by: Christian Riesch<christian.riesch@omicron.at>
> Cc: Albert Aribaud<albert.u.boot@aribaud.net>
> ---
> Hi,
> this is v5 of a patch out of my recent patchset
>
> [PATCH v3 00/15] Add an SPL to boot the da850evm from SPI
> http://lists.denx.de/pipermail/u-boot/2011-November/111182.html
>
> Changes for v5:
> - correct subject line
>
> Changes for v4:
> - split the patchset since it is getting quite big
>
> Regards, Christian
>
> arch/arm/cpu/arm926ejs/start.S | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
> index 8b5355b..772793c 100644
> --- a/arch/arm/cpu/arm926ejs/start.S
> +++ b/arch/arm/cpu/arm926ejs/start.S
> @@ -299,10 +299,12 @@ clear_bss:
> #endif
> mov r2, #0x00000000 /* clear */
>
> -clbss_l:str r2, [r0] /* clear loop... */
> +clbss_l:cmp r0, r1 /* clear loop... */
> + beq clbss_e
For safety, you had better use a bge here, in case r1-r0 is not a
multiple of 4.
> + str r2, [r0]
> add r0, r0, #4
> - cmp r0, r1
> - bne clbss_l
> + b clbss_l
> +clbss_e:
>
> #ifndef CONFIG_SPL_BUILD
> bl coloured_LED_init
Amicalement,
--
Albert.
next prev parent reply other threads:[~2011-11-30 20:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 10:58 [U-Boot] [PATCH v5] arm: Fix clear bss loop for zero length bss Christian Riesch
2011-11-30 20:13 ` Albert ARIBAUD [this message]
2011-11-30 21:02 ` Christian Riesch
2011-12-01 7:53 ` Christian Riesch
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=4ED68E59.2000402@aribaud.net \
--to=albert.u.boot@aribaud.net \
--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.