Aaron Durbin (adurbin@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8945
-gerrit
commit 5ed46f92f7764d3cf8c2cc993c15e3a77085ddf0 Author: Aaron Durbin adurbin@chromium.org Date: Tue Mar 24 10:48:03 2015 -0500
coreboot: used tiered imd for imd-based cbmem
The tiered imd support allows for packing small allocations in a single imd region. This removes internal fragmentation for small object allocations within cbmem.
Change-Id: I010fdf8997df56d950bee74c97c13d338d18354f Signed-off-by: Aaron Durbin adurbin@chromium.org --- src/lib/imd_cbmem.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c index bdce86f..5dd2ceb 100644 --- a/src/lib/imd_cbmem.c +++ b/src/lib/imd_cbmem.c @@ -33,6 +33,9 @@ /* The root region is at least DYN_CBMEM_ALIGN_SIZE . */ #define ROOT_MIN_SIZE DYN_CBMEM_ALIGN_SIZE #define LG_ALIGN ROOT_MIN_SIZE +/* Small allocation parameters. */ +#define SM_ROOT_SIZE 1024 +#define SM_ALIGN 32
static struct imd imd_cbmem CAR_GLOBAL = { };
@@ -70,7 +73,8 @@ void cbmem_initialize_empty(void)
printk(BIOS_DEBUG, "CBMEM: ");
- if (imd_create_empty(imd, ROOT_MIN_SIZE, LG_ALIGN)) + if (imd_create_tiered_empty(imd, ROOT_MIN_SIZE, LG_ALIGN, + SM_ROOT_SIZE, SM_ALIGN)) return;
/* Complete migration to CBMEM. */