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

Grant Likely grant.likely at secretlab.ca
Sun Jul 8 22:38:36 CEST 2007


On 7/8/07, Wolfgang Denk <wd at denx.de> wrote:
> > --- 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?

These two references are in different functions; mem_malloc_init
(where it is an automatic variable) and board_init_r (where it is a
parameter to the function).

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195




More information about the U-Boot mailing list