aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_boottime.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-24 12:26:58 -0400
committerTom Rini <trini@konsulko.com>2019-04-24 12:26:58 -0400
commit180e38ad2dbb3340cc71fb4fa335a68f2a4122ef (patch)
tree7b52b6a9ba7948efa7780248836cf97ddebd9c65 /lib/efi_loader/efi_boottime.c
parentc2bb9c5b9e333c200e3702d9ed5ac9b6095191b6 (diff)
parent7d1e4b73e3f321cd4f0e039aa0387484cf97b25c (diff)
Merge tag 'efi-2019-07-rc1-3' of git://git.denx.de/u-boot-efi
Pull request for UEFI sub-system for v2019.07-rc1 (3) This patch series reworks the implementation of the `bootefi` command to remove code duplication by using the LoadImage() boot service to load binaries. Missing short texts for UEFI protocols are added for display by the `efidebug dh` command. Missing parameter checks for AllocatePages() and CreateDeviceNode() are implemented. The constants for protocol GUIDs are changed to match the names in the UEFI specification.
Diffstat (limited to 'lib/efi_loader/efi_boottime.c')
-rw-r--r--lib/efi_loader/efi_boottime.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index abc295e392..601b0a2cb8 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1591,6 +1591,7 @@ failure:
* @size: size of the loaded image
* Return: status code
*/
+static
efi_status_t efi_load_image_from_path(struct efi_device_path *file_path,
void **buffer, efi_uintn_t *size)
{
@@ -1699,19 +1700,11 @@ efi_status_t EFIAPI efi_load_image(bool boot_policy,
&source_size);
if (ret != EFI_SUCCESS)
goto error;
- /*
- * split file_path which contains both the device and
- * file parts:
- */
- efi_dp_split_file_path(file_path, &dp, &fp);
} else {
- /* In this case, file_path is the "device" path, i.e.
- * something like a HARDWARE_DEVICE:MEMORY_MAPPED
- */
dest_buffer = source_buffer;
- dp = file_path;
- fp = NULL;
}
+ /* split file_path which contains both the device and file parts */
+ efi_dp_split_file_path(file_path, &dp, &fp);
ret = efi_setup_loaded_image(dp, fp, image_obj, &info);
if (ret == EFI_SUCCESS)
ret = efi_load_pe(*image_obj, dest_buffer, info);
@@ -2664,6 +2657,7 @@ efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
}
current_image = image_handle;
+ EFI_PRINT("Jumping into 0x%p\n", image_obj->entry);
ret = EFI_CALL(image_obj->entry(image_handle, &systab));
/*