aboutsummaryrefslogtreecommitdiff
path: root/src/lib/dynamic_cbmem.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2014-02-18 21:55:02 -0600
committerAaron Durbin <adurbin@google.com>2014-03-03 21:47:27 +0100
commit4904802efc8eee37f95163f60823509e2a208af4 (patch)
tree919d78b05dc1a4edd7ab1ec6af74bbea533580a6 /src/lib/dynamic_cbmem.c
parentc7db28c580785b62b9fc67b7526c87d4f0073883 (diff)
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 <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/5302 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/lib/dynamic_cbmem.c')
-rw-r--r--src/lib/dynamic_cbmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/dynamic_cbmem.c b/src/lib/dynamic_cbmem.c
index 0cc6295545..322ead03c7 100644
--- a/src/lib/dynamic_cbmem.c
+++ b/src/lib/dynamic_cbmem.c
@@ -18,7 +18,7 @@
*/
#include <bootstate.h>
-#include <boot/tables.h>
+#include <bootmem.h>
#include <console/console.h>
#include <cbmem.h>
#include <string.h>
@@ -431,14 +431,14 @@ BOOT_STATE_INIT_ENTRIES(cbmem_bscb) = {
init_cbmem_pre_device, NULL),
};
-void cbmem_add_lb_mem(struct lb_memory *mem)
+void cbmem_add_bootmem(void)
{
unsigned long base;
unsigned long top;
base = (unsigned long)cbmem_base();
top = (unsigned long)get_top_aligned();
- lb_add_memory_range(mem, LB_MEM_TABLE, base, top - base);
+ bootmem_add_range(base, top - base, LB_MEM_TABLE);
}
void cbmem_list(void)