public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] U-Boot: Nokia N900 (RX-51) is broken again
@ 2015-06-09 16:23 Pali Rohár
  2015-06-09 17:05 ` [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params Pali Rohár
  0 siblings, 1 reply; 7+ messages in thread
From: Pali Rohár @ 2015-06-09 16:23 UTC (permalink / raw)
  To: u-boot

Hello,

commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f
Author: Simon Glass <sjg@chromium.org>
Date:   Sat Feb 7 10:47:28 2015 -0700

    arm: Allow lr to be saved by board code
    
    The link register value can be required on some boards (e.g. FEL mode on
    sunxi) so use a branch instruction to jump to save_boot_params() instead
    of a branch link.
    
    This requires a branch back to save_boot_params_ret so adjust the users
    to deal with this. For exynos just drop the function since it doesn't
    do anything.
    
    Signed-off-by: Simon Glass <sjg@chromium.org>
    Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
    Acked-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

This commit broke Nokia N900 board support. When I tried it to boot in
qemu I just get this qemu error message:

qemu: fatal: Trying to execute code outside RAM or ROM at 0x7fb0fdfc

R00=806ffd08 R01=80207800 R02=80207800 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=80000414 R13=804ffb90 R14=7fb0fdfc R15=7fb0fdfc
PSR=600001df -ZC- A sys32
Aborted

U-Boot compiled before above commit working in qemu fine.

When I revert commits 5519912164698b634893913b4408fee736d01d06 and
e11c6c279d823dc0d2f470c5c2e3c0a9854a640f on top of master, then u-boot
from master working fine on Nokia N900.

Can you fix broken commit? Because now U-Boot for Nokia N900 board is
not working...

Thanks.

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150609/cc305bcf/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params
  2015-06-09 16:23 [U-Boot] U-Boot: Nokia N900 (RX-51) is broken again Pali Rohár
@ 2015-06-09 17:05 ` Pali Rohár
  2015-06-09 18:11   ` Simon Glass
  2015-06-12 12:12   ` Tom Rini
  0 siblings, 2 replies; 7+ messages in thread
From: Pali Rohár @ 2015-06-09 17:05 UTC (permalink / raw)
  To: u-boot

Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating lr register
in function save_boot_params() and caused U-Boot to crash at early boot time
on Nokia N900 board.

This patch fix calculating return address in lr register and make Nokia N900
board bootable again. Patch was tested in qemu and also on real N900 HW.

Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>
---
 board/nokia/rx51/lowlevel_init.S |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/board/nokia/rx51/lowlevel_init.S b/board/nokia/rx51/lowlevel_init.S
index 9d4ea1b..420ad13 100644
--- a/board/nokia/rx51/lowlevel_init.S
+++ b/board/nokia/rx51/lowlevel_init.S
@@ -105,10 +105,6 @@ fix_start:
 	/* r6 - maximal u-boot size */
 	ldr	r6, imagesize
 
-	/* fix return address */
-	subhi	lr, lr, r5
-	addlo	lr, lr, r5
-
 	/* r1 - start of u-boot after */
 	ldr	r1, startaddr
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params
  2015-06-09 17:05 ` [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params Pali Rohár
@ 2015-06-09 18:11   ` Simon Glass
  2015-06-09 18:27     ` Pali Rohár
  2015-06-12 12:12   ` Tom Rini
  1 sibling, 1 reply; 7+ messages in thread
From: Simon Glass @ 2015-06-09 18:11 UTC (permalink / raw)
  To: u-boot

On 9 June 2015 at 10:05, Pali Roh?r <pali.rohar@gmail.com> wrote:
> Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating lr register
> in function save_boot_params() and caused U-Boot to crash at early boot time
> on Nokia N900 board.
>
> This patch fix calculating return address in lr register and make Nokia N900
> board bootable again. Patch was tested in qemu and also on real N900 HW.
>
> Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>
> ---
>  board/nokia/rx51/lowlevel_init.S |    4 ----
>  1 file changed, 4 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params
  2015-06-09 18:11   ` Simon Glass
@ 2015-06-09 18:27     ` Pali Rohár
  2015-06-11  0:50       ` Simon Glass
  2015-06-12 11:00       ` Pali Rohár
  0 siblings, 2 replies; 7+ messages in thread
From: Pali Rohár @ 2015-06-09 18:27 UTC (permalink / raw)
  To: u-boot

On Tuesday 09 June 2015 20:11:22 Simon Glass wrote:
> On 9 June 2015 at 10:05, Pali Roh?r <pali.rohar@gmail.com> wrote:
> > Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating
> > lr register in function save_boot_params() and caused U-Boot to
> > crash at early boot time on Nokia N900 board.
> > 
> > This patch fix calculating return address in lr register and make
> > Nokia N900 board bootable again. Patch was tested in qemu and also
> > on real N900 HW.
> > 
> > Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>
> > ---
> > 
> >  board/nokia/rx51/lowlevel_init.S |    4 ----
> >  1 file changed, 4 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>

Tom, can you please apply this patch for 2015.07?

Simon & others: in future, please can you CC me all patches which touch 
Nokia N900 board code? We can prevent such breakage. Also you can test 
u-boot for n900 in qemu.

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150609/9d54c170/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params
  2015-06-09 18:27     ` Pali Rohár
@ 2015-06-11  0:50       ` Simon Glass
  2015-06-12 11:00       ` Pali Rohár
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Glass @ 2015-06-11  0:50 UTC (permalink / raw)
  To: u-boot

Hi Pali,

On 9 June 2015 at 12:27, Pali Roh?r <pali.rohar@gmail.com> wrote:
>
> On Tuesday 09 June 2015 20:11:22 Simon Glass wrote:
> > On 9 June 2015 at 10:05, Pali Roh?r <pali.rohar@gmail.com> wrote:
> > > Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating
> > > lr register in function save_boot_params() and caused U-Boot to
> > > crash at early boot time on Nokia N900 board.
> > >
> > > This patch fix calculating return address in lr register and make
> > > Nokia N900 board bootable again. Patch was tested in qemu and also
> > > on real N900 HW.
> > >
> > > Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>
> > > ---
> > >
> > >  board/nokia/rx51/lowlevel_init.S |    4 ----
> > >  1 file changed, 4 deletions(-)
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Tom, can you please apply this patch for 2015.07?
>
> Simon & others: in future, please can you CC me all patches which touch
> Nokia N900 board code? We can prevent such breakage. Also you can test
> u-boot for n900 in qemu.

Here's the list patman generates for that patch:

      Cc:  Rob Herring <robh@kernel.org>
      Cc:  Simon Glass <sjg@chromium.org>
      Cc:  Tom Warren <twarren@nvidia.com>
      Cc:  Thierry Reding <treding@nvidia.com>
      Cc:  Siarhei Siamashka <siarhei.siamashka@gmail.com>
      Cc:  Bryan Brinsko <bryan.brinsko@rockwellcollins.com>
      Cc:  Ian Campbell <ijc@hellion.org.uk>
      Cc:  York Sun <yorksun@freescale.com>
      Cc:  Nishanth Menon <nm@ti.com>
      Cc:  Hans de Goede <hdegoede@redhat.com>
      Cc:  u-boot at lists.denx.de
      Cc:  Tom Rini <trini@konsulko.com>
      Cc:  Albert Aribaud <albert.u.boot@aribaud.net>
      Cc:  Peng Fan <Peng.Fan@freescale.com>
      Cc:  Georges Savoundararadj <savoundg@gmail.com>
      Cc:  Minkyu Kang <mk7.kang@samsung.com>
      Cc:  "Pali Roh?r" <pali.rohar@gmail.com>

I was probably just unwilling to email so many people, but in future I
will be more willing.

>
>
> --
> Pali Roh?r
> pali.rohar at gmail.com

Regards,
Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params
  2015-06-09 18:27     ` Pali Rohár
  2015-06-11  0:50       ` Simon Glass
@ 2015-06-12 11:00       ` Pali Rohár
  1 sibling, 0 replies; 7+ messages in thread
From: Pali Rohár @ 2015-06-12 11:00 UTC (permalink / raw)
  To: u-boot

On Tuesday 09 June 2015 20:27:19 Pali Roh?r wrote:
> On Tuesday 09 June 2015 20:11:22 Simon Glass wrote:
> > On 9 June 2015 at 10:05, Pali Roh?r <pali.rohar@gmail.com> wrote:
> > > Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating
> > > lr register in function save_boot_params() and caused U-Boot to
> > > crash at early boot time on Nokia N900 board.
> > > 
> > > This patch fix calculating return address in lr register and make
> > > Nokia N900 board bootable again. Patch was tested in qemu and also
> > > on real N900 HW.
> > > 
> > > Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>
> > > ---
> > > 
> > >  board/nokia/rx51/lowlevel_init.S |    4 ----
> > >  1 file changed, 4 deletions(-)
> > 
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> Tom, can you please apply this patch for 2015.07?
> 

Hello, can you apply this patch? Without it Nokia N900 code is broken!

-- 
Pali Roh?r
pali.rohar at gmail.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params
  2015-06-09 17:05 ` [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params Pali Rohár
  2015-06-09 18:11   ` Simon Glass
@ 2015-06-12 12:12   ` Tom Rini
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Rini @ 2015-06-12 12:12 UTC (permalink / raw)
  To: u-boot

On Tue, Jun 09, 2015 at 07:05:00PM +0200, Pali Roh?r wrote:

> Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating lr register
> in function save_boot_params() and caused U-Boot to crash at early boot time
> on Nokia N900 board.
> 
> This patch fix calculating return address in lr register and make Nokia N900
> board bootable again. Patch was tested in qemu and also on real N900 HW.
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150612/3b2ee2cb/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-12 12:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-09 16:23 [U-Boot] U-Boot: Nokia N900 (RX-51) is broken again Pali Rohár
2015-06-09 17:05 ` [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params Pali Rohár
2015-06-09 18:11   ` Simon Glass
2015-06-09 18:27     ` Pali Rohár
2015-06-11  0:50       ` Simon Glass
2015-06-12 11:00       ` Pali Rohár
2015-06-12 12:12   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox