]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: Reserve unaccessible memory
authorAlexander Graf <agraf@suse.de>
Fri, 30 Nov 2018 20:24:56 +0000 (21:24 +0100)
committerAlexander Graf <agraf@suse.de>
Sun, 2 Dec 2018 20:59:37 +0000 (21:59 +0100)
commit0c7255c43335f0f059bcf1cedf4c24f31cc89b2b
treee7701d578d250b5cc47abad743bb73ec0738ec12
parentee53ca2be41254af0c81c80997a3a2b7351ecbda
efi_loader: Reserve unaccessible memory

On some systems, not all RAM may be usable within U-Boot. Maybe the
memory maps are incomplete, maybe it's used as workaround for broken
DMA. But whatever the reason may be, a platform can say that it does
not wish to have its RAM accessed above a certain address by defining
board_get_usable_ram_top().

In the efi_loader world, we ignored that hint, mostly because very few
boards actually have real restrictions around this.

So let's honor the board's wish to not access high addresses during
boot time. The best way to do so is by indicating the respective pages
as "allocated by firmware". That way, Operating Systems will still
use the pages after boot, but before boot no allocation will use them.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Baruch Siach <baruch@tkos.co.il>
include/common.h
lib/efi_loader/efi_memory.c