[U-Boot-Users] Fix malloc problem introduced with the relocation fixup for the PPC platform

Wolfgang Denk wd at denx.de
Sun Jul 8 21:53:52 CEST 2007


Dear Stefan,

in message <200707081344.27628.sr at denx.de> you wrote:
> The relocation fixup didn't handle the malloc pointer initialization
> correctly. This patch fixes this problem. Tested successfully on 4xx.
> The relocation fixup patches for 4xx will follow soon.

Thanks.

I hiess you only tested this with CONFIG_RELOC_FIXUP_WORKS undefined?

> --- a/lib_ppc/board.c
> +++ b/lib_ppc/board.c
> @@ -139,10 +139,10 @@ static	ulong	mem_malloc_brk	 = 0;
>   */
>  static void mem_malloc_init (void)
>  {
> -	ulong dest_addr = CFG_MONITOR_BASE + gd->reloc_off;

Here you delte the declaration of dest_addr ...

> @@ -623,6 +623,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
>  
>  #if defined(CONFIG_RELOC_FIXUP_WORKS)
>  	gd->reloc_off = 0;
> +	mem_malloc_end = dest_addr;

...and here you try to use it again?

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
No question is too silly to ask. Of course, some  questions  are  too
silly to to answer...  - L. Wall & R. L. Schwartz, _Programming Perl_




More information about the U-Boot mailing list