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

Aaron Durbin (adurbin@google.com) gerrit at coreboot.org
Sat Mar 28 20:47:43 CET 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 5ad2b8ee79d9f781778a6e0ed6d0a5c7b81a633c
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 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. */



More information about the coreboot-gerrit mailing list