All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Fix of_data copying for CONFIG_OF_FLAT_TREE-using boards
@ 2007-08-15 22:30 Andy Fleming
  2007-08-15 23:40 ` Jerry Van Baren
  2007-08-16 10:11 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Fleming @ 2007-08-15 22:30 UTC (permalink / raw)
  To: u-boot

The fix, "Fix where the #ifdef CFG_BOOTMAPSZ is placed"
neglected to *also* put the code inside the similar #ifdef
for CONFIG_OF_FLAT_TREE.

Signed-off-by: Andy Fleming <afleming@freescale.com>
---
 common/cmd_bootm.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index df1d038..90e3f8b 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -987,6 +987,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
 #endif
 #endif /* CONFIG_OF_LIBFDT */
 #if defined(CONFIG_OF_FLAT_TREE)
+#ifdef CFG_BOOTMAPSZ
+	/*
+	 * The blob must be within CFG_BOOTMAPSZ,
+	 * so we flag it to be copied if it is not.
+	 */
+	if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
+		of_data = of_flat_tree;
+#endif
+
 	/* move of_flat_tree if needed */
 	if (of_data) {
 		ulong of_start, of_len;
-- 
1.5.0.2.230.gfbe3d-dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] Fix of_data copying for CONFIG_OF_FLAT_TREE-using boards
  2007-08-15 22:30 [U-Boot-Users] [PATCH] Fix of_data copying for CONFIG_OF_FLAT_TREE-using boards Andy Fleming
@ 2007-08-15 23:40 ` Jerry Van Baren
  2007-08-15 23:49   ` Jerry Van Baren
  2007-08-16 10:11 ` Wolfgang Denk
  1 sibling, 1 reply; 4+ messages in thread
From: Jerry Van Baren @ 2007-08-15 23:40 UTC (permalink / raw)
  To: u-boot

Andy Fleming wrote:
> The fix, "Fix where the #ifdef CFG_BOOTMAPSZ is placed"
> neglected to *also* put the code inside the similar #ifdef
> for CONFIG_OF_FLAT_TREE.
> 
> Signed-off-by: Andy Fleming <afleming@freescale.com>

I figured if you weren't interested in the CONFIG_OF_FLAT_TREE case, I 
*definitely* wasn't.  ;-)

gvb

> ---
>  common/cmd_bootm.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index df1d038..90e3f8b 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -987,6 +987,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
>  #endif
>  #endif /* CONFIG_OF_LIBFDT */
>  #if defined(CONFIG_OF_FLAT_TREE)
> +#ifdef CFG_BOOTMAPSZ
> +	/*
> +	 * The blob must be within CFG_BOOTMAPSZ,
> +	 * so we flag it to be copied if it is not.
> +	 */
> +	if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
> +		of_data = of_flat_tree;
> +#endif
> +
>  	/* move of_flat_tree if needed */
>  	if (of_data) {
>  		ulong of_start, of_len;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] Fix of_data copying for CONFIG_OF_FLAT_TREE-using boards
  2007-08-15 23:40 ` Jerry Van Baren
@ 2007-08-15 23:49   ` Jerry Van Baren
  0 siblings, 0 replies; 4+ messages in thread
From: Jerry Van Baren @ 2007-08-15 23:49 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote:
> Andy Fleming wrote:
>> The fix, "Fix where the #ifdef CFG_BOOTMAPSZ is placed"
>> neglected to *also* put the code inside the similar #ifdef
>> for CONFIG_OF_FLAT_TREE.
>>
>> Signed-off-by: Andy Fleming <afleming@freescale.com>
> 
> I figured if you weren't interested in the CONFIG_OF_FLAT_TREE case, I 
> *definitely* wasn't.  ;-)

Oops, you _did_ have it in _all_ build configurations and my change 
moved it to only one configuration, so it _was_ my fault that it dropped 
out of the CONFIG_OF_FLAT_TREE case.

As the saying goes: it is better to sit silently and have people think 
you are stupid than to hit the <send> button and confirm it...

gvb

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] Fix of_data copying for CONFIG_OF_FLAT_TREE-using boards
  2007-08-15 22:30 [U-Boot-Users] [PATCH] Fix of_data copying for CONFIG_OF_FLAT_TREE-using boards Andy Fleming
  2007-08-15 23:40 ` Jerry Van Baren
@ 2007-08-16 10:11 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2007-08-16 10:11 UTC (permalink / raw)
  To: u-boot

In message <11872170563143-git-send-email-afleming@freescale.com> you wrote:
> The fix, "Fix where the #ifdef CFG_BOOTMAPSZ is placed"
> neglected to *also* put the code inside the similar #ifdef
> for CONFIG_OF_FLAT_TREE.
> 
> Signed-off-by: Andy Fleming <afleming@freescale.com>

Applied. Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
 The software required `Windows 95 or better', so I installed Linux.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-16 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-15 22:30 [U-Boot-Users] [PATCH] Fix of_data copying for CONFIG_OF_FLAT_TREE-using boards Andy Fleming
2007-08-15 23:40 ` Jerry Van Baren
2007-08-15 23:49   ` Jerry Van Baren
2007-08-16 10:11 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.