summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2016-07-24 19:52:15 -0700
committerLee Leahy <leroy.p.leahy@intel.com>2016-07-26 01:18:09 +0200
commite2422e38ce0ea69f6881ae159792b1f90471adc7 (patch)
tree3eb57f76403e06e5b87058da069f17bfa2f08026 /src/lib
parent3eabe6e9ec471125ab7f33eff91ad3069960c83d (diff)
src/lib: Enable display of cbmem during romstage and postcar
Enable the display of cbmem during romstage and postcar. Add a Kconfig value to prevent coreboot images from increasing in size when this feature is not in use. TEST=Build and run on Galileo Gen2 Change-Id: Ib70ad517ebf7d37a7f46ba503b4432c7c04d7ded Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/15842 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/imd_cbmem.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c
index a0780719fe..3e3e2b0637 100644
--- a/src/lib/imd_cbmem.c
+++ b/src/lib/imd_cbmem.c
@@ -279,7 +279,8 @@ void cbmem_add_bootmem(void)
bootmem_add_range(base, size, LB_MEM_TABLE);
}
-#if ENV_RAMSTAGE
+#if ENV_RAMSTAGE || (IS_ENABLED(CONFIG_EARLY_CBMEM_LIST) \
+ && (ENV_POSTCAR || ENV_ROMSTAGE))
/*
* -fdata-sections doesn't work so well on read only strings. They all
* get put in the same section even though those strings may never be
@@ -288,8 +289,11 @@ void cbmem_add_bootmem(void)
void cbmem_list(void)
{
static const struct imd_lookup lookup[] = { CBMEM_ID_TO_NAME_TABLE };
+ struct imd *imd;
+ struct imd imd_backing;
- imd_print_entries(cbmem_get_imd(), lookup, ARRAY_SIZE(lookup));
+ imd = imd_init_backing_with_recover(&imd_backing);
+ imd_print_entries(imd, lookup, ARRAY_SIZE(lookup));
}
#endif