public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: rmobile: bugfix: wrong register saving in lowlevel_init
Date: Fri, 5 Oct 2012 18:23:08 +0200	[thread overview]
Message-ID: <20121005182308.475b3406@lilith> (raw)
In-Reply-To: <1349411962-29202-1-git-send-email-koba@kmckk.co.jp>

Hi Tetsuyuki,

On Fri,  5 Oct 2012 13:39:22 +0900, Tetsuyuki Kobayashi
<koba@kmckk.co.jp> wrote:

> lowlevel_init() of rmobile badly assumed that ip register holds return address.
> The commit "63ee53a7 armv7 cpu_init_crit: Simplify code" breaks this assumption.
> This patch removes this bad assumption and simplify code.
> 
> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
> ---
> Hello, Albert
> Hello, Tom
> Thank you for merging my patches.
> 
> I checked current u-boot-master and found kzm9g board fails to boot because bug.
> This bugfix patch solves it.
> I think 2012.10 release should have this bugfix.
> 
> Iwamatsu-san, could you double check this patch?
> 
> 
>  arch/arm/cpu/armv7/rmobile/lowlevel_init.S |   12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/rmobile/lowlevel_init.S b/arch/arm/cpu/armv7/rmobile/lowlevel_init.S
> index 1bd391e..4fdca06 100644
> --- a/arch/arm/cpu/armv7/rmobile/lowlevel_init.S
> +++ b/arch/arm/cpu/armv7/rmobile/lowlevel_init.S
> @@ -76,17 +76,7 @@ loop0:
>  	bne  loop0
>  
>  	ldr sp, MERAM_STACK

Is this load of sp still needed?

> -	str ip, [sp]    /* stash old link register */
> -	mov ip, lr      /* save link reg across call */
> -
> -	bl  s_init
> -
> -	ldr ip, [sp]    /* restore save ip */
> -	mov lr, ip      /* restore link reg */
> -
> -	/* back to arch calling code */
> -	mov pc, lr
> +	b s_init
>  
>  	.pool
>  	.align 4

Amicalement,
-- 
Albert.

  reply	other threads:[~2012-10-05 16:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04 16:57 [U-Boot] Pull request: u-boot-arm/master Albert ARIBAUD
2012-10-04 18:31 ` Tom Rini
2012-10-05  4:39   ` [U-Boot] [PATCH] arm: rmobile: bugfix: wrong register saving in lowlevel_init Tetsuyuki Kobayashi
2012-10-05 16:23     ` Albert ARIBAUD [this message]
2012-10-07 11:34       ` Enric Balletbò i Serra
2012-10-07 15:18         ` Jeroen Hofstee
2012-10-07 17:19           ` Albert ARIBAUD
2012-10-07 17:21             ` Albert ARIBAUD
2012-10-07 17:35               ` Albert ARIBAUD
2012-10-09  1:59                 ` Tetsuyuki Kobayashi
2012-10-09  1:49       ` Tetsuyuki Kobayashi
2012-10-08 18:47     ` [U-Boot] " Tom Rini

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=20121005182308.475b3406@lilith \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox