Hello Patrick Georgi, Furquan Shaikh,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/48428
to review the following change.
Change subject: cbmem: Make cbmem_online() accurate on stages after romstage ......................................................................
cbmem: Make cbmem_online() accurate on stages after romstage
cbmem_online() always returns 1 in stages after romstage. However, CBMEM isn't actually immediately available in those stages -- instead, it will only become available when cbmem_initialize() is called. That usually happens very early in the stage, but there are still small amounts of code running beforehand, so it is useful to reflect this distinction.
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: I623c0606a4f49ea98c4c7559436bf32ebb83b456 --- M src/include/cbmem.h 1 file changed, 1 insertion(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/48428/1
diff --git a/src/include/cbmem.h b/src/include/cbmem.h index 7e1da17..9e12afe 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -163,10 +163,7 @@ if (!cbmem_possibly_online()) return 0;
- if (ENV_ROMSTAGE) - return cbmem_initialized; - - return 1; + return cbmem_initialized; }
#endif /* _CBMEM_H_ */