* [PATCH] U-boot passes the initrd as start/end, not start/size.
@ 2007-05-11 17:52 Scott Wood
2007-05-12 3:45 ` Stephen Rothwell
2007-05-14 0:22 ` David Gibson
0 siblings, 2 replies; 4+ messages in thread
From: Scott Wood @ 2007-05-11 17:52 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/boot/cuboot-83xx.c | 2 +-
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 6cbc20a..9af554e 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 f88ba00..e256031 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;
--
1.5.0.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] U-boot passes the initrd as start/end, not start/size.
2007-05-11 17:52 [PATCH] U-boot passes the initrd as start/end, not start/size Scott Wood
@ 2007-05-12 3:45 ` Stephen Rothwell
2007-05-14 15:50 ` Scott Wood
2007-05-14 0:22 ` David Gibson
1 sibling, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2007-05-12 3:45 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, paulus
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
On Fri, 11 May 2007 12:52:03 -0500 Scott Wood <scottwood@freescale.com> wrote:
>
> loader_info.initrd_addr = r4;
> - loader_info.initrd_size = r4 ? r5 : 0;
> + loader_info.initrd_size = r4 ? r5 - r4 : 0;
So do we need a "+ 1" here, or does r5 contain the address past the initrd?
> loader_info.initrd_addr = r4;
> - loader_info.initrd_size = r4 ? r5 : 0;
> + loader_info.initrd_size = r4 ? r5 - r4 : 0;
And here?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] U-boot passes the initrd as start/end, not start/size.
2007-05-11 17:52 [PATCH] U-boot passes the initrd as start/end, not start/size Scott Wood
2007-05-12 3:45 ` Stephen Rothwell
@ 2007-05-14 0:22 ` David Gibson
1 sibling, 0 replies; 4+ messages in thread
From: David Gibson @ 2007-05-14 0:22 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, paulus
On Fri, May 11, 2007 at 12:52:03PM -0500, Scott Wood wrote:
Patch description would be good.
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/boot/cuboot-83xx.c | 2 +-
> 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 6cbc20a..9af554e 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 f88ba00..e256031 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;
Now that cuboot-ebony.c is merged, that should be fixed as well.
We should really think about some macro magic or something to avoid
this duplication of identical-save-for-bd_t's-definition cuboot
handling code.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] U-boot passes the initrd as start/end, not start/size.
2007-05-12 3:45 ` Stephen Rothwell
@ 2007-05-14 15:50 ` Scott Wood
0 siblings, 0 replies; 4+ messages in thread
From: Scott Wood @ 2007-05-14 15:50 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, paulus
Stephen Rothwell wrote:
> On Fri, 11 May 2007 12:52:03 -0500 Scott Wood <scottwood@freescale.com> wrote:
>
>> loader_info.initrd_addr = r4;
>>- loader_info.initrd_size = r4 ? r5 : 0;
>>+ loader_info.initrd_size = r4 ? r5 - r4 : 0;
>
>
> So do we need a "+ 1" here, or does r5 contain the address past the initrd?
It includes the address past the initrd.
-Scott
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-05-14 15:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11 17:52 [PATCH] U-boot passes the initrd as start/end, not start/size Scott Wood
2007-05-12 3:45 ` Stephen Rothwell
2007-05-14 15:50 ` Scott Wood
2007-05-14 0:22 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).