diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/imd_cbmem.c | 13 |
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) \ |