*
* @source_buffer: memory address of the UEFI image
* @source_size: size of the UEFI image
+ * @dp_dev: EFI device-path
+ * @dp_img: EFI image-path
* Return: status code
*/
-static efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size)
+static efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size,
+ struct efi_device_path *dp_dev,
+ struct efi_device_path *dp_img)
{
efi_handle_t mem_handle = NULL, handle;
struct efi_device_path *file_path = NULL;
efi_status_t ret;
u16 *load_options;
- if (!bootefi_device_path || !bootefi_image_path) {
+ if (!dp_img || !dp_img) {
log_debug("Not loaded from disk\n");
/*
* Special case for efi payload not loaded from disk,
goto out;
msg_path = file_path;
} else {
- file_path = efi_dp_concat(bootefi_device_path,
- bootefi_image_path, 0);
- msg_path = bootefi_image_path;
+ file_path = efi_dp_concat(dp_img, dp_img, 0);
+ msg_path = dp_img;
log_debug("Loaded from disk\n");
}
if (ret != EFI_SUCCESS)
return ret;
- return efi_run_image(image, size);
+ return efi_run_image(image, size, bootefi_device_path,
+ bootefi_image_path);
}