]> err.no Git - linux-2.6/commitdiff
[POWERPC] U-boot passes the initrd as start/end, not start/size.
authorScott Wood <scottwood@freescale.com>
Fri, 11 May 2007 17:52:03 +0000 (03:52 +1000)
committerPaul Mackerras <paulus@samba.org>
Sat, 12 May 2007 01:32:48 +0000 (11:32 +1000)
The boot wrapper platform init code on 83xx and 85xx using the cuboot
platform type was incorrectly assuming that u-boot supplied the size
of the initrd, whereas it actually supplies the end address.  This
fixes it.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/cuboot-83xx.c
arch/powerpc/boot/cuboot-85xx.c

index 6cbc20afb4d8bccb28e64337d9cd408eadbec259..9af554eea54be6ea105639e05185b3fe5e221a95 100644 (file)
@@ -57,7 +57,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 
        memcpy(&bd, (bd_t *)r3, sizeof(bd));
        loader_info.initrd_addr = r4;
-       loader_info.initrd_size = r4 ? r5 : 0;
+       loader_info.initrd_size = r4 ? r5 - r4 : 0;
        loader_info.cmdline = (char *)r6;
        loader_info.cmdline_len = r7 - r6;
 
index f88ba00ac1223393e6ab6aff863b205979f8c007..e2560317f2784f0d904815a4e4db05b87d12ece5 100644 (file)
@@ -58,7 +58,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 
        memcpy(&bd, (bd_t *)r3, sizeof(bd));
        loader_info.initrd_addr = r4;
-       loader_info.initrd_size = r4 ? r5 : 0;
+       loader_info.initrd_size = r4 ? r5 - r4 : 0;
        loader_info.cmdline = (char *)r6;
        loader_info.cmdline_len = r7 - r6;