All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Tony Lindgren <tony@atomide.com>,
	Sebastian Reichel <sre@kernel.org>,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	Laura Abbott <lauraa@codeaurora.org>
Subject: Re: N900 v3.19-rc5 arm atags_to_fdt.c is broken
Date: Sat, 24 Jan 2015 00:48:55 +0100	[thread overview]
Message-ID: <20150123234855.GB27111@amd> (raw)
In-Reply-To: <201501232336.36187@pali>

On Fri 2015-01-23 23:36:36, Pali Rohár wrote:
> On Friday 23 January 2015 22:39:55 Pali Rohár wrote:
> > Hello,
> > 
> > when I boot zImage with appended DT n900 in qemu
> > fdt_open_into() function called from file
> > arch/arm/boot/compressed/atags_to_fdt.c (in function
> > atags_to_fdt) always returns -FDT_ERR_NOSPACE.
> > 
> > It means that all ATAGS (including cmdline arguments) passed
> > by bootloader are ignored.
> > 
> > On real n900 device I see that booted DT version also ignore
> > cmdline arguments from bootloader. I cannot debug decompress
> > code on real device, but I think it is same problem as in
> > qemu.
> 
> Looks like this quick patch is fixing above problem:

So... something overruns stack, and bigger stack fixes it...?

							Pavel

> diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
> index 68be901..4a7d75b 100644
> --- a/arch/arm/boot/compressed/head.S
> +++ b/arch/arm/boot/compressed/head.S
> @@ -268,7 +268,7 @@ restart:	adr	r0, LC0
>  		 * area.  No GOT fixup has occurred yet, but none of the
>  		 * code we're about to call uses any global variable.
>  		*/
> -		add	sp, sp, #0x10000
> +		add	sp, sp, #0x20000
>  		stmfd	sp!, {r0-r3, ip, lr}
>  		mov	r0, r8
>  		mov	r1, r6
> @@ -289,7 +289,7 @@ restart:	adr	r0, LC0
>  		bleq	atags_to_fdt
>  
>  		ldmfd	sp!, {r0-r3, ip, lr}
> -		sub	sp, sp, #0x10000
> +		sub	sp, sp, #0x20000
>  #endif
>  
>  		mov	r8, r6			@ use the appended device tree
> 
> 



-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

WARNING: multiple messages have this Message-ID (diff)
From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: N900 v3.19-rc5 arm atags_to_fdt.c is broken
Date: Sat, 24 Jan 2015 00:48:55 +0100	[thread overview]
Message-ID: <20150123234855.GB27111@amd> (raw)
In-Reply-To: <201501232336.36187@pali>

On Fri 2015-01-23 23:36:36, Pali Roh?r wrote:
> On Friday 23 January 2015 22:39:55 Pali Roh?r wrote:
> > Hello,
> > 
> > when I boot zImage with appended DT n900 in qemu
> > fdt_open_into() function called from file
> > arch/arm/boot/compressed/atags_to_fdt.c (in function
> > atags_to_fdt) always returns -FDT_ERR_NOSPACE.
> > 
> > It means that all ATAGS (including cmdline arguments) passed
> > by bootloader are ignored.
> > 
> > On real n900 device I see that booted DT version also ignore
> > cmdline arguments from bootloader. I cannot debug decompress
> > code on real device, but I think it is same problem as in
> > qemu.
> 
> Looks like this quick patch is fixing above problem:

So... something overruns stack, and bigger stack fixes it...?

							Pavel

> diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
> index 68be901..4a7d75b 100644
> --- a/arch/arm/boot/compressed/head.S
> +++ b/arch/arm/boot/compressed/head.S
> @@ -268,7 +268,7 @@ restart:	adr	r0, LC0
>  		 * area.  No GOT fixup has occurred yet, but none of the
>  		 * code we're about to call uses any global variable.
>  		*/
> -		add	sp, sp, #0x10000
> +		add	sp, sp, #0x20000
>  		stmfd	sp!, {r0-r3, ip, lr}
>  		mov	r0, r8
>  		mov	r1, r6
> @@ -289,7 +289,7 @@ restart:	adr	r0, LC0
>  		bleq	atags_to_fdt
>  
>  		ldmfd	sp!, {r0-r3, ip, lr}
> -		sub	sp, sp, #0x10000
> +		sub	sp, sp, #0x20000
>  #endif
>  
>  		mov	r8, r6			@ use the appended device tree
> 
> 



-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2015-01-23 23:49 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 21:39 N900 v3.19-rc5 arm atags_to_fdt.c is broken Pali Rohár
2015-01-23 21:39 ` Pali Rohár
2015-01-23 22:36 ` Pali Rohár
2015-01-23 22:36   ` Pali Rohár
2015-01-23 23:48   ` Pavel Machek [this message]
2015-01-23 23:48     ` Pavel Machek
2015-01-24  9:04     ` Pali Rohár
2015-01-24  9:04       ` Pali Rohár
2015-01-26 16:14   ` Tony Lindgren
2015-01-26 16:14     ` Tony Lindgren
2015-01-26 16:14     ` Tony Lindgren
2015-01-26 16:23     ` Pali Rohár
2015-01-26 16:23       ` Pali Rohár
2015-01-26 16:23       ` Pali Rohár
2015-01-26 17:03       ` Tony Lindgren
2015-01-26 17:03         ` Tony Lindgren
2015-01-26 17:03         ` Tony Lindgren
2015-01-26 18:57         ` Nicolas Pitre
2015-01-26 18:57           ` Nicolas Pitre
2015-01-26 21:48           ` Pavel Machek
2015-01-26 21:48             ` Pavel Machek
2015-01-27  0:06             ` Nicolas Pitre
2015-01-27  0:06               ` Nicolas Pitre
2015-01-27 13:37           ` Pavel Machek
2015-01-27 13:37             ` Pavel Machek
2015-01-27 15:16             ` Nicolas Pitre
2015-01-27 15:16               ` Nicolas Pitre
2015-01-27 15:26               ` Pali Rohár
2015-01-27 15:26                 ` Pali Rohár
2015-01-27 15:26               ` Tony Lindgren
2015-01-27 15:26                 ` Tony Lindgren
2015-01-27 17:53               ` Russell King - ARM Linux
2015-01-27 17:53                 ` Russell King - ARM Linux
2015-01-27 18:50                 ` Nicolas Pitre
2015-01-27 18:50                   ` Nicolas Pitre
2015-01-27 23:09                   ` Aaro Koskinen
2015-01-27 23:09                     ` Aaro Koskinen
2015-01-27 23:17                   ` Pavel Machek
2015-01-27 23:17                     ` Pavel Machek
2015-02-02 13:39               ` Pavel Machek
2015-02-02 13:39                 ` Pavel Machek
2015-02-02 13:56                 ` Nicolas Pitre
2015-02-02 13:56                   ` Nicolas Pitre

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=20150123234855.GB27111@amd \
    --to=pavel@ucw.cz \
    --cc=aaro.koskinen@iki.fi \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=lauraa@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=pali.rohar@gmail.com \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    /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.