[U-Boot] [PATCH 1/4] efi_loader: set revision in loaded image protocol

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Jul 5 06:17:58 UTC 2018


The revision number has to be set in the loaded image protocol.

The problem was detected by running the SCT in
Protocol/LoadedImage/BlackBoxTest/LoadedImageBBTestMain.c:890

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 include/efi_api.h             | 2 ++
 lib/efi_loader/efi_boottime.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/include/efi_api.h b/include/efi_api.h
index 99ea2c5b69..c98cc34908 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -321,6 +321,8 @@ struct efi_system_table {
 	EFI_GUID(0x5b1b31a1, 0x9562, 0x11d2, \
 		 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
 
+#define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000
+
 struct efi_loaded_image {
 	u32 revision;
 	void *parent_handle;
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 105e80bb52..9ac8e18680 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1484,6 +1484,7 @@ efi_status_t efi_setup_loaded_image(
 	/* efi_exit() assumes that the handle points to the info */
 	obj->handle = info;
 
+	info->revision =  EFI_LOADED_IMAGE_PROTOCOL_REVISION;
 	info->file_path = file_path;
 
 	if (device_path) {
-- 
2.18.0



More information about the U-Boot mailing list