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

Aaron Durbin (adurbin@google.com) gerrit at coreboot.org
Wed Apr 1 21:30:17 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 c3df4fea87a3ab670acff3a4da09c180d45b138e
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 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. */



More information about the coreboot-gerrit mailing list