summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-08-11 11:31:05 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-10-25 13:58:02 +0000
commitb7cbb7c43157d45187abcf953d693152230a8120 (patch)
tree40775aeb774648dae4e72f15d62172865f48eb87 /src/include
parentbfadc78bd719196e2fa78c23a8a0bb27dff65fd6 (diff)
cbmem.h: Drop cbmem_possible_online in favor of ENV_HAS_CBMEM
The macro ENV_HAS_CBMEM achieves the same as this inline function. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I6d65ca51c863abe2106f794398ddd7d7d9ac4b5e Reviewed-on: https://review.coreboot.org/c/coreboot/+/77166 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <czapiga@google.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cbmem.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 5e2128e5f9..7af011010b 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -136,28 +136,12 @@ void cbmem_add_records_to_cbtable(struct lb_header *header);
#define CBMEM_READY_HOOK_EARLY(x) _CBMEM_INIT_HOOK_UNUSED(x)
#endif
-/*
- * Returns 0 for the stages where we know that cbmem does not come online.
- * Even if this function returns 1 for romstage, depending upon the point in
- * bootup, cbmem might not actually be online.
- */
-static inline int cbmem_possibly_online(void)
-{
- if (ENV_BOOTBLOCK)
- return 0;
-
- if (ENV_SEPARATE_VERSTAGE && !CONFIG(VBOOT_STARTS_IN_ROMSTAGE))
- return 0;
-
- return 1;
-}
-
/* Returns 1 after running cbmem init hooks, 0 otherwise. */
static inline int cbmem_online(void)
{
extern int cbmem_initialized;
- if (!cbmem_possibly_online())
+ if (!ENV_HAS_CBMEM)
return 0;
return cbmem_initialized;