]> git.sur5r.net Git - u-boot/commitdiff
efi_loader: save image relocation address and size
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 3 Apr 2018 20:29:31 +0000 (22:29 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 4 Apr 2018 09:37:34 +0000 (11:37 +0200)
For analyzing crash output the relocation address and size are needed.
Save them in the loaded image info.

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_image_loader.c

index d9a69dbc005f4ad0405af6724a5a04e2f78c7600..2be470b23787f6ea7e61b9fe56b1b927ae1d5fb7 100644 (file)
@@ -331,6 +331,8 @@ struct efi_loaded_image {
 
        /* Below are efi loader private fields */
 #ifdef CONFIG_EFI_LOADER
+       void *reloc_base;
+       aligned_u64 reloc_size;
        efi_status_t exit_status;
        struct jmp_buf_data exit_jmp;
 #endif
index cac64ba9fec229f9f1f2fd9b9efb8e31ce7fe5db..701387b95f242313fc9aa8a5fb36dc5290831a3e 100644 (file)
@@ -221,6 +221,8 @@ void *efi_load_pe(void *efi, struct efi_loaded_image *loaded_image_info)
        /* Populate the loaded image interface bits */
        loaded_image_info->image_base = efi;
        loaded_image_info->image_size = image_size;
+       loaded_image_info->reloc_base = efi_reloc;
+       loaded_image_info->reloc_size = virt_size;
 
        return entry;
 }