From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] fix memory corruption on versatile
Date: Thu, 27 Dec 2012 09:59:07 +0100 [thread overview]
Message-ID: <20121227095907.453ca2bf@lilith> (raw)
In-Reply-To: <2378261.z7fZb2oNGC@merom>
Hi Pavel,
> Technically, the patch was quoted whole, but it goes on top of another,
> that added the DM and early heap macros to the board config, so its of
> no use as it is.
Ok, so IIUC this patch is not required for fixing anything in the
current mainline u-boot, and would not break anything in mainline
u-boot either, but is required to arrange pre-relocation memory mapping
for current DM code to work.
> > Based on the assumption that this patch is complete as quoted, and on
> > your comments above, my comment would be (to both Marek and you) why do
> > you nead a heap during flash-based inits?
>
> We want the DM to replace most of the board-specific code (by providing a
> "driver" that is configured by board-specific values, essentialy encapsulating
> common init code independently on actual board and memory layout), so that the
> board-specific init only loads required drivers with correct parameters,
> instead of directly initializing the hardware (there was a thought of having a
> RAM driver, that would init the main memory when loaded, and provided
> relcation as a method/service, not sure if we want to go this far at the
> moment).
> for this we need the DM to run in early (flash-based) phase. The DM itself
> cannot work without a heap, so we need one there.
Well, for lack of understanding of DM (I know DM documentation is out
there, just haven't had time to look it up so far) I cannot tell
whether it cannot work without a heap or whether it could work without
it but hasn't been designed that way.
This leads to two questions:
1) Why does the DM need a heap in the first place? When you look at the
DM requirements (as I understand them), they basically include a full C
runtime environment, which is precisely what we do *not* provide in the
first stage of U-Boot, because this first stage is *meant* to set the C
runtime environment up.
2) Assuming these requirements can be met in a viable way, is this heap
supposed to survive through relocation? And if it is, then how will it,
and most of all, how will references to it, remain consistent without
an ugly manual relocation fixup process?
> Pavel Herrmann
Amicalement,
--
Albert.
next prev parent reply other threads:[~2012-12-27 8:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1356312106-23337-1-git-send-email-morpheus.ibis@gmail.com>
[not found] ` <1356312106-23337-3-git-send-email-morpheus.ibis@gmail.com>
2012-12-24 1:27 ` [U-Boot] [PATCH 3/4] fix memory corruption on versatile Marek Vasut
2012-12-24 13:56 ` Albert ARIBAUD
2012-12-24 14:57 ` Pavel Herrmann
2012-12-25 11:37 ` Albert ARIBAUD
2012-12-25 22:35 ` Pavel Herrmann
2012-12-27 8:59 ` Albert ARIBAUD [this message]
2012-12-28 1:44 ` Pavel Herrmann
2012-12-28 10:31 ` Albert ARIBAUD
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=20121227095907.453ca2bf@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