From: Scott Wood Date: Fri, 11 May 2007 17:52:03 +0000 (+1000) Subject: [POWERPC] U-boot passes the initrd as start/end, not start/size. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dab4d7984ee61c8eb25569b12e7a996f5aaef2ba;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [POWERPC] U-boot passes the initrd as start/end, not start/size. 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 Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c index 6cbc20afb4d..9af554eea54 100644 --- a/arch/powerpc/boot/cuboot-83xx.c +++ b/arch/powerpc/boot/cuboot-83xx.c @@ -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; diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c index f88ba00ac12..e2560317f27 100644 --- a/arch/powerpc/boot/cuboot-85xx.c +++ b/arch/powerpc/boot/cuboot-85xx.c @@ -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;