public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: crt0: Pass malloc base address
Date: Wed, 11 Nov 2015 21:33:28 +0100	[thread overview]
Message-ID: <20151111213328.134763ed@lilith> (raw)
In-Reply-To: <1447273397-22833-1-git-send-email-festevam@gmail.com>

Hello Fabio,

On Wed, 11 Nov 2015 18:23:17 -0200, Fabio Estevam <festevam@gmail.com>
wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Commit 5ba534d247d418 ("arm: Switch 32-bit ARM to using generic global_data
> setup") causes malloc() to fail in SPL.
> 
> The reason is that the GD_MALLOC_BASE is not passed anymore.

This is the explanation of the SPL fail, but not the /cause/ of it.
IOW, why is GD_MALLOC_BASE not passed any more, and what function or
routine is it not passed any more to?

> Restore the code that passes malloc base so that we can have
> malloc working in SPL code again.
> 
> [...]

> +#if defined(CONFIG_SYS_MALLOC_F_LEN)
> +	sub	sp, sp, #CONFIG_SYS_MALLOC_F_LEN
> +	str	sp, [r9, #GD_MALLOC_BASE]
> +#endif

NAK, as this only papers over the actual issue. Board_init_f_mem should
have set the malloc base in GD. Therefore, rather than doing it again
later, we must determine why it was not properly done earlier.11111

Can you give me the toolchain version, board name and commit ID that I
could use to reproduce the *faulty* build and check the generated code?

Amicalement,
-- 
Albert.

  parent reply	other threads:[~2015-11-11 20:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 20:23 [U-Boot] [PATCH] ARM: crt0: Pass malloc base address Fabio Estevam
2015-11-11 20:26 ` Simon Glass
2015-11-11 20:41   ` Fabio Estevam
2015-11-11 21:00     ` Fabio Estevam
2015-11-11 21:08       ` Simon Glass
2015-11-11 21:24         ` Fabio Estevam
2015-11-11 21:49           ` Simon Glass
2015-11-12  6:57             ` Albert ARIBAUD
2015-11-12 12:48               ` Fabio Estevam
2015-11-12 15:59               ` Simon Glass
2015-11-12 16:13                 ` Albert ARIBAUD
2015-11-14  2:12                   ` Simon Glass
2015-11-14 15:23                     ` Albert ARIBAUD
2015-11-11 20:33 ` Albert ARIBAUD [this message]
2015-11-11 20:49   ` Fabio Estevam

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=20151111213328.134763ed@lilith \
    --to=albert.u.boot@aribaud.net \
    --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