summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2017-08-02 10:40:25 -0600
committerAaron Durbin <adurbin@chromium.org>2017-08-03 16:37:00 +0000
commitfb532427163f8262ad5bf69e455366eabe4ea5b2 (patch)
tree61e0cc77f07d34c68f18c03411d4fbf9c183e326 /src/lib
parent33e57906f5efa435ddf524cfc3bb3f8a82864975 (diff)
lib/cbmem: remove cbmem_region_used()
The cbmem_region_used() function wasn't being utilized outside this module. Threfore, reduce the surface area. Change-Id: I28a9d02221048ab0aa4cd3d986d17ee7692ce636 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/20858 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/imd_cbmem.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c
index dc17f05a8d..4fb78cef96 100644
--- a/src/lib/imd_cbmem.c
+++ b/src/lib/imd_cbmem.c
@@ -266,20 +266,13 @@ void *cbmem_entry_start(const struct cbmem_entry *entry)
return imd_entry_at(imd, cbmem_to_imd(entry));
}
-void cbmem_region_used(uintptr_t *base, size_t *size)
-{
- void *baseptr;
- imd_region_used(cbmem_get_imd(), &baseptr, size);
- *base = (uintptr_t)baseptr;
-}
-
void cbmem_add_bootmem(void)
{
- uintptr_t base = 0;
+ void *baseptr = NULL;
size_t size = 0;
- cbmem_region_used(&base, &size);
- bootmem_add_range(base, size, LB_MEM_TABLE);
+ imd_region_used(cbmem_get_imd(), &baseptr, &size);
+ bootmem_add_range((uintptr_t)baseptr, size, LB_MEM_TABLE);
}
#if ENV_RAMSTAGE || (IS_ENABLED(CONFIG_EARLY_CBMEM_LIST) \