From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 0/9] Add a pre-relocation malloc() implementation
Date: Mon, 14 Jul 2014 18:28:47 -0400 [thread overview]
Message-ID: <20140714222847.GL1847@bill-the-cat> (raw)
In-Reply-To: <1405052613-20987-1-git-send-email-sjg@chromium.org>
On Thu, Jul 10, 2014 at 10:23:24PM -0600, Simon Glass wrote:
> There has been talk on and off of a pre-relocation malloc() implementation.
> Driver model needs this so that it can work before relocation.
>
> A previous implementation was sent in a v1 series.
>
> This implementation works by allocating space on the stack. The benefit is
> that boards do not need to specify the address of the malloc() area, only
> the size. The down-side is that due to the way board_init_f() is called,
> architecture-specific code needs to be used to allocate the space.
>
> No clever algorithms are used to allocate space, free() is a nop and
> realloc() is not supported. This fits well with the desire to avoid wasting
> space on bucket tables and the hassle of supporting BSS data before
> relocation. We don't expect 'churn' in the pre-relocation case - we just
> want to allocate small amounts of memory temporarily.
>
> After relocation a new malloc() pool is created and the old one is lost,
> although pointers into it will survive the immediate process of relocation.
>
> Implementations are provided for sandbox and arm (32-bit only).
>
> A related change is made to the early init for each arch to make this work.
My concern without a fix right now is how to make use of this in SPL,
when we're able to move SPL over to using still more generic code rather
than re-inventing the board_init_{f,r} wheels, in the case where we init
DRAM.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140714/b900d0ee/attachment.pgp>
next prev parent reply other threads:[~2014-07-14 22:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 4:23 [U-Boot] [PATCH v3 0/9] Add a pre-relocation malloc() implementation Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 1/9] Remove form-feeds from dlmalloc.c Simon Glass
2014-07-26 15:22 ` Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 2/9] arm: Set up global data before board_init_f() Simon Glass
2014-07-11 17:44 ` Jeroen Hofstee
2014-07-23 12:16 ` Simon Glass
2014-07-23 13:31 ` Tom Rini
2014-07-28 12:17 ` Simon Glass
2014-08-09 21:26 ` Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 3/9] sandbox: " Simon Glass
2014-07-26 15:22 ` Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 4/9] Add a simple malloc() implementation for pre-relocation Simon Glass
2014-07-26 15:23 ` Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 5/9] arm: Support pre-relocation malloc() Simon Glass
2014-07-23 12:19 ` Simon Glass
2014-08-09 21:25 ` Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 6/9] exynos: Enable " Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 7/9] sandbox: Support " Simon Glass
2014-07-26 15:23 ` Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 8/9] sandbox: config: Enable " Simon Glass
2014-07-26 15:24 ` Simon Glass
2014-07-11 4:23 ` [U-Boot] [PATCH v3 9/9] sandbox: Always enable malloc debug Simon Glass
2014-07-26 15:24 ` Simon Glass
2014-07-14 22:28 ` Tom Rini [this message]
2014-07-15 0:16 ` [U-Boot] [PATCH v3 0/9] Add a pre-relocation malloc() implementation Simon Glass
2014-07-23 12:24 ` Simon Glass
2014-07-23 13:41 ` Tom Rini
2014-07-28 12:16 ` Simon Glass
2014-08-04 11:21 ` 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=20140714222847.GL1847@bill-the-cat \
--to=trini@ti.com \
--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