diff options
author | Scott Wood <scottwood@freescale.com> | 2007-05-11 13:52:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-11 21:32:48 -0400 |
commit | dab4d7984ee61c8eb25569b12e7a996f5aaef2ba (patch) | |
tree | 5b6ff1e3ca2be89cb2811060c6e91a40b1aa9214 | |
parent | 36bd2836f39d9c256689475432dd7d36eda1c491 (diff) |
[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 <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/boot/cuboot-83xx.c | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/cuboot-85xx.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c index 6cbc20afb4d8..9af554eea54b 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, | |||
57 | 57 | ||
58 | memcpy(&bd, (bd_t *)r3, sizeof(bd)); | 58 | memcpy(&bd, (bd_t *)r3, sizeof(bd)); |
59 | loader_info.initrd_addr = r4; | 59 | loader_info.initrd_addr = r4; |
60 | loader_info.initrd_size = r4 ? r5 : 0; | 60 | loader_info.initrd_size = r4 ? r5 - r4 : 0; |
61 | loader_info.cmdline = (char *)r6; | 61 | loader_info.cmdline = (char *)r6; |
62 | loader_info.cmdline_len = r7 - r6; | 62 | loader_info.cmdline_len = r7 - r6; |
63 | 63 | ||
diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c index f88ba00ac122..e2560317f278 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, | |||
58 | 58 | ||
59 | memcpy(&bd, (bd_t *)r3, sizeof(bd)); | 59 | memcpy(&bd, (bd_t *)r3, sizeof(bd)); |
60 | loader_info.initrd_addr = r4; | 60 | loader_info.initrd_addr = r4; |
61 | loader_info.initrd_size = r4 ? r5 : 0; | 61 | loader_info.initrd_size = r4 ? r5 - r4 : 0; |
62 | loader_info.cmdline = (char *)r6; | 62 | loader_info.cmdline = (char *)r6; |
63 | loader_info.cmdline_len = r7 - r6; | 63 | loader_info.cmdline_len = r7 - r6; |
64 | 64 | ||