Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
u-boot-rpi3
0031-efi_loader-provide-efi_mem_desc-ver.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0031-efi_loader-provide-efi_mem_desc-ver.patch of Package u-boot-rpi3
From 83df880f61247379526d92d79bfffa702756c99e Mon Sep 17 00:00:00 2001 From: Mian Yousaf Kaukab <yousaf.kaukab@gmail.com> Date: Mon, 5 Sep 2016 23:59:22 +0200 Subject: [PATCH] efi_loader: provide efi_mem_desc version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> (cherry picked from commit 4c02c11de89388db29ac413b09d1ab5ae63f3ecb) Signed-off-by: Andreas Färber <afaerber@suse.de> --- include/efi.h | 2 ++ lib/efi_loader/efi_memory.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/efi.h b/include/efi.h index 1dbc3b77b4..d319e18ab2 100644 --- a/include/efi.h +++ b/include/efi.h @@ -151,6 +151,8 @@ struct efi_mem_desc { u64 attribute; }; +#define EFI_MEMORY_DESCRIPTOR_VERSION 1 + /* Allocation types for calls to boottime->allocate_pages*/ #define EFI_ALLOCATE_ANY_PAGES 0 #define EFI_ALLOCATE_MAX_ADDRESS 1 diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index df2381e42c..1f6491bc17 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -336,6 +336,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;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor