]> git.ipfire.org Git - people/ms/u-boot.git/commit - common/board_r.c
efi_loader: Implement memory allocation and map
authorAlexander Graf <agraf@suse.de>
Fri, 4 Mar 2016 00:10:04 +0000 (01:10 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 16 Mar 2016 01:30:10 +0000 (21:30 -0400)
commit5d00995c361c5a01b0684927d2686fdb540ab467
tree3522c68b25ae145c7148a22f3f8f3f86e8a2aae4
parentb9939336d09ddc01e9e9d4e6a654f54f28decb12
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 <agraf@suse.de>
Tested-by: Simon Glass <sjg@chromium.org>
common/board_r.c
include/efi_loader.h
lib/efi_loader/efi_memory.c [new file with mode: 0644]