[coreboot-gerrit] Patch set updated for coreboot: cbmem: Add comment for cbmem_top returning NULL if backing store is not ready

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Tue Mar 29 04:29:33 CEST 2016


Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14181

-gerrit

commit cf920bbac86730335a1744dc136f9a6e1833c68f
Author: Furquan Shaikh <furquan at google.com>
Date:   Mon Mar 28 13:23:13 2016 -0700

    cbmem: Add comment for cbmem_top returning NULL if backing store is not ready
    
    Board or chipset needs to ensure that cbmem backing store is ready
    when returning the cbmem top address. cbmem infrastructure has no
    support for checking the validity of the backing store/address.
    
    E.g.: If romstage handles cbmem coming online, chipset or board need
    to ensure that call to cbmem_top in romstage returns NULL if the
    backing store is not yet initialized.
    
    Added a comment to ensure that developers know this requirement while
    implementing cbmem_top for future chipsets/boards.
    
    Change-Id: I0086b8e528f65190b764a84365cf9bf970b69c3f
    Signed-off-by: Furquan Shaikh <furquan at google.com>
---
 src/include/cbmem.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 2e947a1..524bfb5 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -80,7 +80,10 @@ void cbmem_initialize_empty_id_size(u32 id, u64 size);
 
 /* Return the top address for dynamic cbmem. The address returned needs to
  * be consistent across romstage and ramstage, and it is required to be
- * below 4GiB. */
+ * below 4GiB.
+ * Board or chipset should return NULL if any interface that might rely on cbmem
+ * (e.g. cbfs, vboot) is used before the cbmem backing store has been
+ * initialized. */
 void *cbmem_top(void);
 
 /* Add a cbmem entry of a given size and id. These return NULL on failure. The



More information about the coreboot-gerrit mailing list