All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Fix malloc problem introduced with the relocation fixup for the PPC platform
Date: Mon, 9 Jul 2007 07:30:38 +0200	[thread overview]
Message-ID: <200707090730.39133.sr@denx.de> (raw)
In-Reply-To: <20070708195352.5A66A3535E0@atlas.denx.de>

Hi Wolfgang,

On Sunday 08 July 2007, Wolfgang Denk wrote:
> in message <200707081344.27628.sr@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?

No, I tested both versions. And with this patch both versions work. At least 
on the 2 4xx platforms I tested on. The patches for the 4xx relocation fixup 
will follow later. This patch is generic and needed on all ppc platforms.

> > --- 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?

As Grant already mentionend, there are two different variables.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  parent reply	other threads:[~2007-07-09  5:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08 11:44 [U-Boot-Users] Fix malloc problem introduced with the relocation fixup for the PPC platform Stefan Roese
2007-07-08 13:55 ` Grant Likely
2007-07-08 19:53 ` Wolfgang Denk
2007-07-08 20:38   ` Grant Likely
2007-07-09  5:30   ` Stefan Roese [this message]
2007-07-09  9:57 ` [U-Boot-Users] Is there somebody using the AmigaOneG3SE board? Jin Zhengxiong-R64188
2007-07-10 22:43 ` [U-Boot-Users] Fix malloc problem introduced with the relocation fixup for the PPC platform Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200707090730.39133.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.