Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48428 )
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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48428 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com Reviewed-by: Arthur Heymans arthur@aheymans.xyz --- M src/include/cbmem.h 1 file changed, 1 insertion(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Arthur Heymans: Looks good to me, approved
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_ */