lib/bootmem: Introduce custom bootmem tags

Introduce bootmem custom memory tags and use them instead of reusing
LB_MEM tags.
Use asserts in bootmem_add_range to verify parameters.

Tested with uImage payload on Cavium SoC.

Change-Id: I7be8fa792fc7933ca218ecd43d250d3a9c55caa6
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25633
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Patrick Rudolph
2018-04-05 09:14:51 +02:00
committed by Patrick Georgi
parent 666c172d38
commit 9ab9db0bc5
5 changed files with 66 additions and 25 deletions

View File

@ -300,7 +300,7 @@ void cbmem_add_bootmem(void)
size_t size = 0;
imd_region_used(cbmem_get_imd(), &baseptr, &size);
bootmem_add_range((uintptr_t)baseptr, size, LB_MEM_TABLE);
bootmem_add_range((uintptr_t)baseptr, size, BM_MEM_TABLE);
}
#if ENV_RAMSTAGE || (IS_ENABLED(CONFIG_EARLY_CBMEM_LIST) \