Thread (20 messages) flat view 20 messages, 6 authors, 2015-02-02

N900 v3.19-rc5 arm atags_to_fdt.c is broken

From: Pali Rohár <hidden>
Date: 2015-01-26 16:25:53
Also in: linux-omap, lkml

On Monday 26 January 2015 17:14:55 Tony Lindgren wrote:
* Pali Roh?r [off-list ref] [150123 14:39]:
quoted
On Friday 23 January 2015 22:39:55 Pali Roh?r wrote:
quoted
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:
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
quoted
 		 * 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
Nico, got any ideas about this one? This seems like a
regression somewhere..

Regards,

Tony
$ du -b arch/arm/boot/dts/omap3-n900.dtb 
70212   arch/arm/boot/dts/omap3-n900.dtb

$ echo $((0x10000))
65536

I would say, problem is because omap3-n900 binary DT is too large

-- 
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.infradead.org/pipermail/linux-arm-kernel/attachments/20150126/12452f90/attachment-0001.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help