uboot/include
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
..
andestech
asm-generic Add a simple malloc() implementation for pre-relocation 2014-07-23 14:05:40 +01:00
bedbug
configs rpi_b: handle import of environments in files with CRLF as line endings 2014-07-22 07:44:26 -04:00
cramfs include: delete unused header files 2014-01-24 16:59:07 -05:00
dm dm: Tidy up four minor code nits 2014-06-20 11:56:50 -06:00
dt-bindings tegra: dts: Bring in GPIO bindings from linux 2014-06-20 11:56:33 -06:00
faraday include: delete unused header files 2014-01-24 16:59:07 -05:00
galileo
jffs2
linux linux/compat.h: port lower_32_bits and upper_32_bits from Linux 2014-07-22 07:44:24 -04:00
lzma
mtd
pcmcia
power Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' 2014-06-30 23:00:34 +02:00
samsung samsung: misc: add env default option to lcd menu 2014-05-07 19:40:39 +09:00
synopsys
u-boot includes: move openssl headers to include/u-boot 2014-06-19 11:19:04 -04:00
usb drivers/usb : Define usb control register mask for w1c bits 2014-05-16 16:24:27 -05:00
zfs
.gitignore .gitignore: drop include/asm from ignored file list 2014-02-19 11:10:04 -05:00
74xx_7xx.h
ACEX1K.h
MCD_dma.h
MCD_progCheck.h
MCD_tasksInit.h
SA-1100.h
_exports.h
addr_map.h
aes.h aes: make apply_cbc_chain_data non-static 2014-04-18 16:14:17 -04:00
ahci.h
ali512x.h
altera.h whitespace cleanups 2014-07-22 07:44:27 -04:00
ambapp.h
android_image.h image: add support for Android's boot image format 2014-05-08 10:38:29 +02:00
ansi.h
api_public.h
armcoremodule.h
asm-offsets.h
ata.h
atmel_hlcdc.h
atmel_lcdc.h
atmel_mci.h
autoboot.h main: Make the execution path a little clearer in main.c 2014-05-29 17:52:03 -04:00
bcd.h
bitfield.h arch: bcm281xx: Initial commit of bcm281xx architecture code 2014-02-22 19:30:24 +01:00
bmp_layout.h
bootcount.h
bootm.h Enhance fit_check_sign to check all images 2014-06-19 11:19:02 -04:00
bootretry.h Rename bootretry functions and remove #ifdefs 2014-05-29 17:49:00 -04:00
bootstage.h
bouncebuf.h
bus_vcxk.h
bzlib.h
cbfs.h
circbuf.h
cli.h main: Make the execution path a little clearer in main.c 2014-05-29 17:52:03 -04:00
cli_hush.h Rename hush to cli_hush 2014-05-29 17:45:31 -04:00
clk.h common: Add new clk command 2014-02-04 16:32:20 +01:00
cmd_spl.h
command.h Avoid including config.h in command.h 2014-06-19 11:19:01 -04:00
common.h mpc8xx: remove fads board support 2014-07-07 19:43:02 -04:00
common_timing_params.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
commproc.h mpc8xx: remove v37 board support 2014-07-07 19:43:02 -04:00
compiler.h tools: compiler.h: add missing time.h 2014-07-22 07:44:25 -04:00
config_cmd_all.h fs/fdos: Remove 2014-02-21 08:42:47 -05:00
config_cmd_default.h
config_cmd_defaults.h
config_defaults.h
config_distro_defaults.h config: Fix line lengths in include/config_distro_defaults.h 2014-02-05 08:04:38 -05:00
config_fallbacks.h bootm: make use of legacy image format configurable 2014-06-05 14:44:56 -04:00
config_phylib_all_drivers.h
config_uncmd_spl.h
cpsw.h drivers: net: cpsw: add support to have phy address from cpsw platform data 2014-03-04 09:41:53 -05:00
crc.h
cros_ec.h cros_ec: Implement I2C pass-through 2014-03-17 20:05:48 -06:00
cros_ec_message.h cros_ec: Sync up with latest Chrome OS EC version 2014-03-17 20:05:47 -06:00
dataflash.h
ddr_spd.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
dfu.h dfu: mmc: Provide support for eMMC boot partition access 2014-05-15 00:24:24 +02:00
dialog_pmic.h
div64.h
dm-demo.h dm: rename device struct to udevice 2014-05-27 10:21:32 -04:00
dm.h include/dm.h: fix inclusion guard 2014-06-21 10:06:58 -06:00
dm9000.h
dp83848.h
ds1722.h
ds4510.h
dtt.h
dwmmc.h mmc: dw_mmc: support the DDR mode 2014-05-16 14:54:26 +09:00
e500.h powerpc/85xx: Enhance get_sys_info() to check clocking mode 2014-04-22 17:58:52 -07:00
ec_commands.h cros_ec: Sync up with latest Chrome OS EC version 2014-03-17 20:05:47 -06:00
edid.h
elf.h
env_attr.h
env_callback.h env_callback.h: spl: mark callback as maybe_unused 2014-07-18 17:53:23 -04:00
env_default.h
env_flags.h
environment.h env: Implement support for encrypting environment 2014-03-21 16:44:02 -04:00
errno.h
exports.h
ext4fs.h fs:ext4:write:fix: Reinitialize global variables after updating a file 2014-05-12 16:31:50 -04:00
ext_common.h
fat.h fat: Define MAX_CLUSTSIZE using CONFIG_FS_FAT_MAX_CLUSTSIZE 2014-06-05 14:44:56 -04:00
fdt.h
fdt_support.h armv8/fsl-lsch3: Add support to load and start MC Firmware 2014-07-03 08:40:58 +02:00
fdtdec.h exynos: Enable the LCD backlight for snow 2014-05-28 10:58:19 +09:00
fis.h
flash.h
fm_eth.h
fpga.h fpga: Added support to load bit stream from SD/MMC 2014-05-20 15:23:46 +02:00
fs.h fs: implement infrastructure for an 'exists' function 2014-02-19 09:47:33 -05:00
fsl_ddr.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_ddr_dimm_params.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_ddr_sdram.h mpc85xx/t104x: Add deep sleep framework support 2014-04-22 17:58:49 -07:00
fsl_ddrc_version.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_diu_fb.h
fsl_esdhc.h driver: Add support of image load for MMC & SPI in SPL 2014-04-22 17:58:50 -07:00
fsl_ifc.h driver/fsl_ifc: Add a function to finalize CS0 address binding 2014-04-22 17:58:47 -07:00
fsl_immap.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_mc.h armv8/fsl-lsch3: Add support to load and start MC Firmware 2014-07-03 08:40:58 +02:00
fsl_mdio.h
fsl_pmic.h
fsl_usb.h powerpc/mpc85xx: Add Differential SYSCLK config support T1040 2014-04-22 17:58:52 -07:00
fuse.h
g_dnl.h USB: gadget: added a saner gadget downloader registration API 2014-05-05 08:21:47 +02:00
gdsys_fpga.h i2c: IHS I2C master driver 2014-07-07 19:47:18 -04:00
gt64120.h
hash.h hash: Use uint8_t in preference to u8 2014-06-19 11:18:55 -04:00
hw_sha.h
hwconfig.h
i2c.h OMAP24xx I2C: Add support for set-speed 2014-02-20 06:48:23 +01:00
i2s.h
i8042.h
ide.h common: cmd_ide: use __weak and add prototypes 2014-07-22 07:44:26 -04:00
image.h fit: make sha256 support optional 2014-07-07 19:47:19 -04:00
initcall.h initcall: Improve debugging support 2014-05-28 10:58:19 +09:00
input.h
iomux.h
ioports.h
iotrace.h Add an I/O tracing feature 2014-06-20 11:54:29 -06:00
ipu_pixfmt.h
key_matrix.h
keyboard.h
kgdb.h
lattice.h
lcd.h mpc8xx: remove rbc823 board support 2014-07-07 19:43:02 -04:00
lcdvideo.h
ld9040.h
led-display.h
libata.h
libfdt.h
libfdt_env.h
libtizen.h
linker_lists.h common: fixed linker-list example 2014-05-05 10:24:13 +02:00
linux_logo.h
lmb.h
logbuff.h
lxt971a.h
lynxkdi.h
malloc.h
mb862xx.h
mc9sdz60.h
mc13783.h
mc13892.h
mc34704.h
menu.h
micrel.h
mii_phy.h
miiphy.h
mk48t59.h
mmc.h mmc: prevent some warnings with make W=1 2014-07-18 17:53:24 -04:00
mpc5xx.h
mpc5xxx.h
mpc5xxx_sdma.h
mpc8xx.h
mpc8xx_irq.h
mpc83xx.h
mpc85xx.h
mpc86xx.h
mpc106.h
mpc824x.h
mpc8260.h powerpc: ep8248: remove orphan board 2014-05-30 14:03:24 -04:00
mpc8260_irq.h
msc01.h
mtd_node.h
mv88e6352.h
mvmfp.h
nand.h mtd: nand: atmel: prepare for nand spl boot support 2014-03-09 19:19:06 +01:00
net.h net: rename and refactor eth_rand_ethaddr() function 2014-05-12 15:19:46 -04:00
netdev.h sunxi: add gmac Ethernet support 2014-05-25 16:25:12 +02:00
nios2-epcs.h
nios2-io.h
nios2-yanu.h
nios2.h
nomadik.h
ns16550.h serial: nsl16550: add hw flow control support 2014-05-12 15:19:45 -04:00
ns87308.h
onenand_uboot.h
os.h sandbox: Allow Ctrl-C to work in sandbox 2014-03-17 20:05:49 -06:00
palmas.h ARM: OMAP5: Power: add LDO2 support for Palmas driver 2014-05-13 19:43:00 -04:00
part.h disk: part_efi: add get_partition_info_efi_by_name() 2014-06-05 14:44:56 -04:00
part_efi.h
pc_keyb.h
pca953x.h
pca9564.h
pca9698.h
pci.h
pci_gt64120.h
pci_ids.h
pci_msc01.h
pcmcia.h mpc8xx: remove fads board support 2014-07-07 19:43:02 -04:00
phy.h wandboard: Fix sparse warning 2014-03-05 12:23:48 +01:00
physmem.h
post.h
ppc_asm.tmpl powerpc: mpc8260: consolidate CONFIG_MPC8260 and CONFIG_8260 2014-03-07 10:59:06 -05:00
ppc_defs.h
ps2mult.h
pwm.h
radeon.h
reiserfs.h
rtc.h
s6e63d6.h
s_record.h
sandboxblockdev.h
sandboxfs.h sandbox: implement exists() function 2014-02-19 09:47:34 -05:00
sata.h
scf0403_lcd.h
scsi.h
sdhci.h Merge branch 'u-boot/master' into 'u-boot-arm/master' 2014-04-08 09:25:08 +02:00
search.h Add option -r to env import to allow import of text files with CRLF as line endings 2014-07-22 07:44:26 -04:00
sed156x.h
sed13806.h
serial.h
sh_pfc.h
sh_tmu.h
sja1000.h
slre.h
sm501.h
sound.h sound: Move Samsung-specific code into its own file 2014-03-17 20:05:49 -06:00
spartan2.h fpga: xilinx: Simplify load/dump/info function handling 2014-05-13 09:13:59 +02:00
spartan3.h fpga: xilinx: Simplify load/dump/info function handling 2014-05-13 09:13:59 +02:00
spd.h
spd_sdram.h
spi.h sf: Add dual memories support - DUAL_PARALLEL 2014-01-12 21:40:22 +05:30
spi_flash.h driver: Add support of image load for MMC & SPI in SPL 2014-04-22 17:58:50 -07:00
spl.h common: spl: Add spl sata boot support 2014-02-19 10:47:43 -05:00
splash.h
status_led.h common: board_f: cosmetic use __weak for leds 2014-07-18 17:53:23 -04:00
stdio_dev.h
stratixII.h
sx151x.h
sym53c8xx.h
systemace.h
tca642x.h
tegra-kbc.h
thor.h USB: gadget: added a saner gadget downloader registration API 2014-05-05 08:21:47 +02:00
timestamp.h
tis.h
tmu.h
tpm.h
tps6586x.h tps6586x.h: fix inclusion guard 2014-06-11 16:27:06 -04:00
trace.h
tsec.h
tsi108.h
tsi148.h
twl4030.h
twl6030.h
tws.h
ubi_uboot.h
universe.h
usb.h usb: dfu: fix boards wo USB cable detection 2014-05-05 08:00:28 +02:00
usb_cdc_acm.h
usb_defs.h
usb_ether.h usb: net: introduce support for Moschip USB ethernet 2014-03-12 17:04:31 -04:00
usb_mass_storage.h ums: move IO support code to common location 2014-05-08 10:38:29 +02:00
usbdescriptors.h
usbdevice.h
usbroothubdes.h usb: create common header virtual root hub descriptors 2014-03-10 18:53:36 +01:00
uuid.h lib: uuid: add functions to generate UUID version 4 2014-04-02 16:35:53 -04:00
version.h
video.h
video_ad7176.h
video_ad7177.h
video_ad7179.h
video_easylogo.h
video_fb.h
video_font.h
video_font_4x6.h
video_font_data.h
video_logo.h
virtex2.h fpga: xilinx: Simplify load/dump/info function handling 2014-05-13 09:13:59 +02:00
vsc7385.h
vsprintf.h
vxworks.h
w83c553f.h
watchdog.h
xilinx.h fpga: Added support to load bit stream from SD/MMC 2014-05-20 15:23:46 +02:00
xyzModem.h
zfs_common.h
zynqpl.h fpga: xilinx: Simplify load/dump/info function handling 2014-05-13 09:13:59 +02:00