u-boot-brain/include/asm-generic
Simon Glass d59476b644 Add a simple malloc() implementation for pre-relocation
If we are to have driver model before relocation we need to support some
way of calling memory allocation routines.

The standard malloc() is pretty complicated:

1. It uses some BSS memory for its state, and BSS is not available before
relocation

2. It supports algorithms for reducing memory fragmentation and improving
performace of free(). Before relocation we could happily just not support
free().

3. It includes about 4KB of code (Thumb 2) and 1KB of data. However since
this has been loaded anyway this is not really a problem.

The simplest way to support pre-relocation malloc() is to reserve an area
of memory and allocate it in increasing blocks as needed. This
implementation does this.

To enable it, you need to define the size of the malloc() pool as described
in the README. It will be located above the pre-relocation stack on
supported architectures.

Note that this implementation is only useful on machines which have some
memory available before dram_init() is called - this includes those that
do no DRAM init (like tegra) and those that do it in SPL (quite a few
boards). Enabling driver model preior to relocation for the rest of the
boards is left for a later exercise.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-07-23 14:05:40 +01:00
..
errno.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
global_data.h Add a simple malloc() implementation for pre-relocation 2014-07-23 14:05:40 +01:00
gpio.h dm: rename device struct to udevice 2014-05-27 10:21:32 -04:00
ioctl.h x86: Fix support for booting bzImage 2010-05-06 00:17:01 +02:00
sections.h arm: remove unneeded symbol offsets and _TEXT_BASE 2014-02-26 21:18:12 +01:00
signal.h asm-generic/signal.h: import from linux 2010-01-17 20:36:05 -05:00
u-boot.h bd_info: remove bi_barudrate member from struct bd_info 2014-05-12 15:19:45 -04:00
unaligned.h asm-generic/unaligned.h: dynamic default unaligned accesses 2010-03-14 00:10:09 +01:00