[U-Boot] [PATCH 09/16] efi_loader: Implement memory allocation and map

Simon Glass sjg at chromium.org
Wed Feb 3 04:31:36 CET 2016


On 1 February 2016 at 19:45, Alexander Graf <agraf at 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 <agraf at 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 <sjg at chromium.org>
Tested on Beaglebone Black and Minnowboard MAX:
Tested-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list