[coreboot-gerrit] Patch set updated for coreboot: d5206e7 coreboot: used tiered imd for imd-based cbmem

Aaron Durbin (adurbin@google.com) gerrit at coreboot.org
Mon Mar 30 23:42:13 CEST 2015


Aaron Durbin (adurbin at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8945

-gerrit

commit d5206e7428f0f346eac2676a20c7fe621eac6ef2
Author: Aaron Durbin <adurbin at 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 at 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 5816630..f7f2b3f 100644
--- a/src/lib/imd_cbmem.c
+++ b/src/lib/imd_cbmem.c
@@ -32,6 +32,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 = { };
 
@@ -60,7 +63,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. */



More information about the coreboot-gerrit mailing list