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: Sun, 8 Jul 2007 13:44:27 +0200 [thread overview]
Message-ID: <200707081344.27628.sr@denx.de> (raw)
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.
Signed-off-by: Stefan Roese <sr@denx.de>
---
commit 3a1e66ba75172959973377d6069f1d12e1a4ecb3
tree 6fdde574dd5328b805e0e438ebb32cc7e7de8f4d
parent dcc0264878406d52b879d2e5a63d3d793371434e
author Stefan Roese <sr@denx.de> Sun, 08 Jul 2007 13:42:52 +0200
committer Stefan Roese <sr@denx.de> Sun, 08 Jul 2007 13:42:52 +0200
lib_ppc/board.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 8bb885d..5e156ab 100644
--- 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;
-
- mem_malloc_end = dest_addr;
- mem_malloc_start = dest_addr - TOTAL_MALLOC_LEN;
+#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+ mem_malloc_end = CFG_MONITOR_BASE + gd->reloc_off;
+#endif
+ mem_malloc_start = mem_malloc_end - TOTAL_MALLOC_LEN;
mem_malloc_brk = mem_malloc_start;
memset ((void *) mem_malloc_start,
@@ -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;
#else
gd->reloc_off = dest_addr - CFG_MONITOR_BASE;
#endif
next reply other threads:[~2007-07-08 11:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-08 11:44 Stefan Roese [this message]
2007-07-08 13:55 ` [U-Boot-Users] Fix malloc problem introduced with the relocation fixup for the PPC platform Grant Likely
2007-07-08 19:53 ` Wolfgang Denk
2007-07-08 20:38 ` Grant Likely
2007-07-09 5:30 ` Stefan Roese
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=200707081344.27628.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox