All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] board_f: save "malloc_base" from zeroing in case of CONFIG_SYS_MALLOC_F_LEN
Date: Tue, 20 Jan 2015 08:07:47 +0100	[thread overview]
Message-ID: <20150120080747.07f168b7@lilith> (raw)
In-Reply-To: <1421690103-29091-1-git-send-email-abrodkin@synopsys.com>

Hello Alexey,

On Mon, 19 Jan 2015 20:55:03 +0300, Alexey Brodkin
<Alexey.Brodkin@synopsys.com> wrote:
> In case of CONFIG_SYS_MALLOC_F_LEN "malloc_base" is used for early
> start-up code and is set very early, typically in "start.S" or "crt1.S".

There is no "crt1.S" in U-Boot. Did you mean "crt0.S"?

> In current implementation in case of CONFIG_SYS_GENERIC_GLOBAL_DATA all
> global data gets zeroed on "board_init_f" entry. But by that time
> "malloc_base" could have been set already, which means it will be zeroed
> and subsequent C-code will be executed improperly (if executed at all -
> if there's no memory mapped to 0 or it is read-only then on some arches
> there will be an exception and others will quetly die).
> 
> To work-around described situation we just need to make sure
> "malloc_base" is saved prior zeroing global data and recovered
> afterwards.

Keeping data from being zeroed etc is usually done through GD. Could
malloc_base be placed there instead of creating a specific exemption
for it?

Amicalement,
-- 
Albert.

  parent reply	other threads:[~2015-01-20  7:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 17:55 [U-Boot] [PATCH] board_f: save "malloc_base" from zeroing in case of CONFIG_SYS_MALLOC_F_LEN Alexey Brodkin
2015-01-19 19:21 ` Simon Glass
2015-01-20  7:07 ` Albert ARIBAUD [this message]
2015-01-20 13:06   ` Alexey Brodkin
2015-01-21  7:23     ` Albert ARIBAUD
2015-01-22 17:57     ` Simon Glass

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=20150120080747.07f168b7@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 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.