From 5d00995c361c5a01b0684927d2686fdb540ab467 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 4 Mar 2016 01:10:04 +0100 Subject: efi_loader: Implement memory allocation and map The EFI loader needs to maintain views of memory - general system memory windows as well as used locations inside those and potential runtime service MMIO windows. To manage all of these, add a few helpers that maintain an internal representation of the map the similar to how the EFI API later on reports it to the application. For allocations, the scheme is very simple. We basically allow allocations to replace chunks of previously done maps, so that a new LOADER_DATA allocation for example can remove a piece of the RAM map. When no specific address is given, we just take the highest possible address in the lowest RAM map that fits the allocation size. Signed-off-by: Alexander Graf Tested-by: Simon Glass --- common/board_r.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') diff --git a/common/board_r.c b/common/board_r.c index 6432d2374a..2cb6836435 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -794,6 +794,9 @@ init_fnc_t init_sequence_r[] = { */ #ifdef CONFIG_CLOCKS set_cpu_clk_info, /* Setup clock information */ +#endif +#ifdef CONFIG_EFI_LOADER + efi_memory_init, #endif stdio_init_tables, initr_serial, -- cgit v1.2.3