summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-03-28 13:23:13 -0700
committerFurquan Shaikh <furquan@google.com>2016-03-29 19:40:23 +0200
commit6f009dc485e8bfb0a9f316c1e831938cf46b0c3a (patch)
treeacc8066ec1706b2cdb3aaf5810dfe27fbf0cc4e3
parent169956db9d1ad1f7751d57595a459e9e1b782957 (diff)
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. Add 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> Reviewed-on: https://review.coreboot.org/14181 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r--src/include/cbmem.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 2e947a1973..524bfb5748 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