From 4904802efc8eee37f95163f60823509e2a208af4 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 18 Feb 2014 21:55:02 -0600 Subject: coreboot: introduce notion of bootmem for memory map at boot The write_coreboot_table() in coreboot_table.c was already using struct memrange for managing and building up the entries that eventually go into the lb_memory table. Abstract that concept out to a bootmem memory map. The bootmem concept can then be used as a basis for loading payloads, for example. Change-Id: I7edbbca6bbd0568f658fde39ca93b126cab88367 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/5302 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Alexandru Gagniuc --- src/lib/cbmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/cbmem.c') diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c index d97f6afdb0..33fa721767 100644 --- a/src/lib/cbmem.c +++ b/src/lib/cbmem.c @@ -19,9 +19,9 @@ #include #include +#include #include #include -#include #include #include #if CONFIG_HAVE_ACPI_RESUME && !defined(__PRE_RAM__) @@ -265,9 +265,9 @@ BOOT_STATE_INIT_ENTRIES(cbmem_bscb) = { init_cbmem_post_device, NULL), }; -void cbmem_add_lb_mem(struct lb_memory *mem) +void cbmem_add_bootmem(void) { - lb_add_memory_range(mem, LB_MEM_TABLE, cbmem_base, cbmem_size); + bootmem_add_range(cbmem_base, cbmem_size, LB_MEM_TABLE); } void cbmem_list(void) -- cgit v1.2.3