coreboot/src/lib
Duncan Laurie f5e9ac48c6 SMM: Add support for malloc in SMM if using TSEG
This is used by the SPI driver and ELOG.

It requires SMM TSEG and a _heap/_eheap region defined in the
linker script.  The first time malloc is called in SMM the
start and end pointers to the heap region will be relocated
for the TSEG region.

Enable SPI flash and ELOG in SMM and successfully
allocate memory.  The allocated addresses are verified
to be sure they are within the TSEG heap region:

smm.elf:00014000 B _eheap
smm.elf:00010000 B _heap
TSEG base is 0xad000000

Memory allocated in ELOG:
ELOG: MEM @0xad018030

Change-Id: I5cca38e4888d597cbbfcd9983cd6a7ae3600c2a3
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: http://review.coreboot.org/1312
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2012-07-24 23:44:19 +02:00
..
cbfs.c Make CBFS output more consistent 2012-05-04 08:11:28 +02:00
cbfs_core.c Make CBFS output more consistent 2012-05-04 08:11:28 +02:00
cbmem.c Tell CBMEM pretty printer about MRC cache 2012-05-03 20:33:13 +02:00
cbmem_console.c Add infrastructure for global data in the CAR phase of boot 2012-03-29 23:19:13 +02:00
clog2.c printk_foo -> printk(BIOS_FOO, ...) 2010-03-22 11:42:32 +00:00
compute_ip_checksum.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
debug.c Myles suspected this hangs certain machines, so back it out. 2010-04-15 12:43:07 +00:00
delay.c
fallback_boot.c refactor vesa mode setting code and bootsplash code 2011-10-13 20:00:50 +02:00
gcc.c Add prototypes to silence these warnings. 2009-10-29 16:49:50 +00:00
generic_dump_spd.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
generic_sdram.c Remove duplicate line from pci_ids.h. 2010-10-07 23:02:06 +00:00
jpeg.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
jpeg.h Random cosmetic fixes (trivial). 2010-02-22 16:41:49 +00:00
lzma.c Shrink the stack sizes we need in coreboot 2012-07-24 19:52:53 +02:00
lzmadecode.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
lzmadecode.h Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
Makefile.inc SMM: Add support for malloc in SMM if using TSEG 2012-07-24 23:44:19 +02:00
malloc.c SMM: Add support for malloc in SMM if using TSEG 2012-07-24 23:44:19 +02:00
memchr.c Add an implementation for the memchr library function 2012-03-09 20:00:53 +01:00
memcmp.c
memcpy.c
memmove.c
memset.c
ne2k.c Fix of fix copy and paste errors in ne2k.c (r6512 by stepan) 2011-04-22 22:26:04 +00:00
nrv2b.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
ns8390.h Add support for the console over Ethernet (through PCI NE2000). 2010-07-16 20:02:09 +00:00
ramtest.c Replace ramtest pattern to assist in DIMM configuration 2012-03-25 20:17:51 +02:00
stack.c Implement stack overflow checking for the BSP 2012-07-24 23:29:12 +02:00
timestamp.c Add timestamp collecting to coreboot. 2012-03-28 20:43:59 +02:00
trace.c Add support for the tracing infastructure in coreboot. 2011-09-07 01:26:47 +02:00
uart8250.c Remove whitespace. 2012-02-17 19:04:31 +01:00
uart8250mem.c Don't loop infinitely long on serial comm failures 2012-05-08 04:34:26 +02:00
usbdebug.c remove trailing whitespace 2011-11-01 19:07:45 +01:00
version.c This patch fixes build.h dependencies in coreboot again. 2010-03-29 13:04:13 +00:00
xmodem.c Move C labels to start-of-line 2012-03-07 17:48:03 +01:00