public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] pxa: Save lr register in relocate_code function
Date: Sun, 13 Jan 2013 00:53:20 +0100	[thread overview]
Message-ID: <201301130053.21146.marex@denx.de> (raw)
In-Reply-To: <1358026767-28130-3-git-send-email-luk0104@gmail.com>

Dear Lukasz Dalek,

> When u-boot is compiled for PXA25x processor, pxa/start.S is calling
> cpu_init_crit by BL instruction. BL is overwriting lr register so
> relocate_code is going into infinite loop. This patch preservs lr
> register in r12 before calling cpu_init_crit and after function returns
> restores it.
> 
> Signed-off-by: Lukasz Dalek <luk0104@gmail.com>

Acked-by: Marek Vasut <marex@denx.de>

Tom/Albert, can you please apply this for .01, seems critical to me ?

> ---
>  arch/arm/cpu/pxa/start.S |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
> index 72af869..e71803e 100644
> --- a/arch/arm/cpu/pxa/start.S
> +++ b/arch/arm/cpu/pxa/start.S
> @@ -183,7 +183,9 @@ relocate_code:
> 
>  /* Disable the Dcache RAM lock for stack now */
>  #ifdef	CONFIG_CPU_PXA25X
> +	mov	r12, lr
>  	bl	cpu_init_crit
> +	mov	lr, r12
>  #endif
> 
>  	adr	r0, _start

Best regards,
Marek Vasut

  reply	other threads:[~2013-01-12 23:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 21:39 [U-Boot] [PATCH 1/3] pxa: Add support for board specific reset function Lukasz Dalek
2013-01-12 21:39 ` [U-Boot] [PATCH 2/3] h2200: Add board reset support Lukasz Dalek
2013-01-12 23:54   ` Marek Vasut
2013-01-13  1:00     ` Łukasz Dałek
2013-01-13  1:05       ` Marek Vasut
2013-01-13  1:32         ` [U-Boot] [PATCH v2] " Lukasz Dalek
2013-01-13  1:32           ` [U-Boot] [PATCH] pxa: Add weak attribute to reset_cpu() function Lukasz Dalek
2013-01-12 21:39 ` [U-Boot] [PATCH 3/3] pxa: Save lr register in relocate_code function Lukasz Dalek
2013-01-12 23:53   ` Marek Vasut [this message]
2013-01-14 23:23   ` [U-Boot] [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=201301130053.21146.marex@denx.de \
    --to=marex@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