efi_loader: set revision in loaded image protocol
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 5 Jul 2018 06:17:58 +0000 (08:17 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 25 Jul 2018 12:59:44 +0000 (14:59 +0200)
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@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
include/efi_api.h
lib/efi_loader/efi_boottime.c

index 0c3dd3cdd49c609c8006e5bd4d4b3c11de8f2ebd..53798d5449009455f8d90237fa542132aa703852 100644 (file)
@@ -318,6 +318,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;
index 6bd64b9df9c85aee0daedec6abb02db0f4f10c32..18698566f53a8ce26baa36ad1c21ee2a9db97f62 100644 (file)
@@ -1497,6 +1497,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) {