[U-Boot] [PATCH v3 1/1] efi_loader: refactor efi_setup_loaded_image()
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Sep 23 13:29:14 UTC 2018
On 09/23/2018 02:34 PM, Alexander Graf wrote:
>> + * Load the EFI binary into a newly assigned memory unwinding the relocation
>> + * information, install the loaded image protocol, and call the binary.
>> */
>> static efi_status_t do_bootefi_exec(void *efi,
>> struct efi_device_path *device_path,
>> struct efi_device_path *image_path)
>> {
>> - struct efi_loaded_image loaded_image_info = {};
>> - struct efi_object loaded_image_info_obj = {};
>> efi_handle_t mem_handle = NULL;
>> struct efi_device_path *memdp = NULL;
>> efi_status_t ret;
>> + struct efi_loaded_image_obj *image_handle;
>> + struct efi_loaded_image *loaded_image_info;
> Better initialize those to NULL so we don't have to remember to do that
> in efi_setup_loaded_image().
>
What is missing is checking the return code of efi_setup_loaded_image.
I will fix that.
Regards
Heinrich
>>
>> EFIAPI efi_status_t (*entry)(efi_handle_t image_handle,
>> struct efi_system_table *st);
>> @@ -367,8 +374,8 @@ static efi_status_t do_bootefi_exec(void *efi,
>> assert(device_path && image_path);
>> }
>>
>> - efi_setup_loaded_image(&loaded_image_info, &loaded_image_info_obj,
>> - device_path, image_path);
>> + efi_setup_loaded_image(device_path, image_path, &image_handle,
>> + &loaded_image_info);
>>
>> /*
More information about the U-Boot
mailing list