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 95e9809e12cf4d2b185acbcea0c5550762b4e005 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 2b7156d..e683a35 100644 --- a/src/lib/imd_cbmem.c +++ b/src/lib/imd_cbmem.c @@ -31,6 +31,9 @@
/* The root region is at least DYN_CBMEM_ALIGN_SIZE . */ #define ROOT_MIN_SIZE DYN_CBMEM_ALIGN_SIZE +/* Small allocation parameters. */ +#define SM_ROOT_SIZE 1024 +#define SM_ALIGN 32
static struct imd imd_cbmem CAR_GLOBAL = { };
@@ -59,7 +62,8 @@ void cbmem_initialize_empty(void)
printk(BIOS_DEBUG, "CBMEM: ");
- if (imd_create_empty(imd, DYN_CBMEM_ALIGN_SIZE, DYN_CBMEM_ALIGN_SIZE)) + if (imd_create_tiered_empty(imd, DYN_CBMEM_ALIGN_SIZE, + DYN_CBMEM_ALIGN_SIZE, SM_ROOT_SIZE, SM_ALIGN)) return;
/* Complete migration to CBMEM. */