[coreboot-gerrit] Patch set updated for coreboot: 87cd5d0 coreboot: use tiered imd for cbmem

Aaron Durbin (adurbin@google.com) gerrit at coreboot.org
Sat Mar 7 15:15:45 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/8624

-gerrit

commit 87cd5d0f2d81a3e1b430f8af97163a3efbb1f52c
Author: Aaron Durbin <adurbin at 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 at 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. */



More information about the coreboot-gerrit mailing list