]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: AllocateAdress error handling
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 11 May 2019 06:21:17 +0000 (08:21 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 12 May 2019 18:54:22 +0000 (20:54 +0200)
commit220e53183e87aa41011627ce6cd7921e38f82bf4
tree9462ec2536eabca5da0e8600822bb7e5fc77b075
parent8652b4be82c583c1059195126a8d5eee69a97c36
efi_loader: AllocateAdress error handling

If AllocatePages() is called with AllocateAddress, the UEFI spec requires
to return EFI_NOT_FOUND in case the memory page does not exist.

The UEFI SCT II 2017 spec additionally requires to return EFI_NOT_FOUND if
the page is already allocated.

Check that *Memory refers to an unallocated page.

UEFI SCT II (2017): AllocatePages(), 5.1.2.1.9 - 5.1.2.1.10

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_memory.c