Aaron Durbin (adurbin@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8624
-gerrit
commit 36be05cf93095ed43a5693ec7272d5af34e3ff6a Author: Aaron Durbin adurbin@chromium.org Date: Fri Mar 6 20:41:20 2015 -0600
coreboot: use tiered imd for cbmem
In order to reduce internal fragmentation within cbmem employ a tiered imd.
Change-Id: I53040a5a96f41fd99d3de2dcb6f4fb6619346012 Signed-off-by: Aaron Durbin adurbin@chromium.org --- src/lib/dynamic_cbmem.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/lib/dynamic_cbmem.c b/src/lib/dynamic_cbmem.c index 529c589..fa73527 100644 --- a/src/lib/dynamic_cbmem.c +++ b/src/lib/dynamic_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
#if !defined(__PRE_RAM__) static void *cached_cbmem_top; @@ -80,7 +83,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. */