]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: get_memory_map: return parameters whenever possible
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Wed, 11 Mar 2020 06:18:18 +0000 (15:18 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 11 Mar 2020 07:23:05 +0000 (08:23 +0100)
commit6eb5acdae5f641ce243bd22cd7afc26aeebfe3c8
tree1e2698a5f416ec857ab17509652f8db3ee06845a
parentca42f468eabd5dde6db2daf260d2708ad354ac03
efi_loader: get_memory_map: return parameters whenever possible

Currently, if GetMemoryMap API returns EFI_BUFFER_TOO_SMALL, it doesn't
set valid values to other parameters, descriptor_size and
descriptor_version, except memory_map_size.
Some efi applications, however, may use those value; in particular,
xen uses descriptor_size to calculate a size of buffer to be allocated.

While UEFI specification is ambiguous in this point, it would be better
to address this issue proactively to maximize the compatibility with
existing efi applications.

With this patch, for example, xen.efi (and hence linux kernel) can be
started via bootefi without modification.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_memory.c