aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <yousaf.kaukab@gmail.com>2016-09-05 23:59:22 +0200
committerTom Rini <trini@konsulko.com>2016-09-07 08:49:07 -0400
commit4c02c11de89388db29ac413b09d1ab5ae63f3ecb (patch)
treed24ccafe4a897abd47a35ffb0bc9149e6462ef4e /lib
parentbac17b78daceeba1af2e1d8cd204ee460c71c93a (diff)
downloadu-boot-4c02c11de89388db29ac413b09d1ab5ae63f3ecb.zip
u-boot-4c02c11de89388db29ac413b09d1ab5ae63f3ecb.tar.gz
u-boot-4c02c11de89388db29ac413b09d1ab5ae63f3ecb.tar.bz2
efi_loader: provide efi_mem_desc version
Provide version of struct efi_mem_desc in efi_get_memory_map(). EFI_BOOT_SERVICES.GetMemoryMap() in UEFI specification v2.6 defines memory descriptor version to 1. Linux kernel also expects descriptor version to be 1 and prints following warning during boot if its not: Unexpected EFI_MEMORY_DESCRIPTOR version 0 Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_memory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index df3547c..80e4e26 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -339,6 +339,9 @@ efi_status_t efi_get_memory_map(unsigned long *memory_map_size,
if (descriptor_size)
*descriptor_size = sizeof(struct efi_mem_desc);
+ if (descriptor_version)
+ *descriptor_version = EFI_MEMORY_DESCRIPTOR_VERSION;
+
if (*memory_map_size < map_size)
return EFI_BUFFER_TOO_SMALL;