From f5e9ac48c65bba2876d1dd7f103cd15c5e33c7df Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Sat, 23 Jun 2012 13:33:32 -0700 Subject: 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 Reviewed-on: http://review.coreboot.org/1312 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/console/Makefile.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/console/Makefile.inc') diff --git a/src/console/Makefile.inc b/src/console/Makefile.inc index f3b875862e..f8928adca9 100644 --- a/src/console/Makefile.inc +++ b/src/console/Makefile.inc @@ -7,6 +7,7 @@ ramstage-y += die.c smm-y += printk.c smm-y += vtxprintf.c +smm-$(CONFIG_SMM_TSEG) += die.c romstage-y += vtxprintf.c romstage-$(CONFIG_CACHE_AS_RAM) += console.c -- cgit v1.2.3