On 1 February 2016 at 19:45, Alexander Graf <ag...@suse.de> wrote: > 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 <ag...@suse.de> > > --- > > v2 -> v3: > > - Rewrite memory allocation and map > - Document header > --- > common/board_r.c | 3 + > include/efi_loader.h | 19 +++ > lib/efi_loader/efi_memory.c | 314 > ++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 336 insertions(+) > create mode 100644 lib/efi_loader/efi_memory.c
Reviewed-by: Simon Glass <s...@chromium.org> Tested on Beaglebone Black and Minnowboard MAX: Tested-by: Simon Glass <s...@chromium.org> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot