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>
This commit is contained in:
parent
e38482610c
commit
364f9de149
|
@ -163,10 +163,7 @@ static inline int cbmem_online(void)
|
|||
if (!cbmem_possibly_online())
|
||||
return 0;
|
||||
|
||||
if (ENV_ROMSTAGE)
|
||||
return cbmem_initialized;
|
||||
|
||||
return 1;
|
||||
return cbmem_initialized;
|
||||
}
|
||||
|
||||
#endif /* _CBMEM_H_ */
|
||||
|
|
Loading…
Reference in New Issue