Furquan Shaikh (furquan@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14181
-gerrit
commit 24f05d43ae86b7cfa850d7fec4b22881a2ce3cbd Author: Furquan Shaikh furquan@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@google.com --- src/include/cbmem.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/include/cbmem.h b/src/include/cbmem.h index 2e947a1..aacc2c8 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -80,7 +80,9 @@ 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 cbmem backing store has not been + * initialized yet. */ void *cbmem_top(void);
/* Add a cbmem entry of a given size and id. These return NULL on failure. The