[PATCH 4/4] efi_loader: print image load address in StartImage
Ilias Apalodimas
ilias.apalodimas at linaro.org
Tue Jan 7 14:32:57 CET 2025
On Thu, 2 Jan 2025 at 20:11, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> When starting image add the image load address to the debug output.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> lib/efi_loader/efi_boottime.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index 080e7f78ae3..bc0cbd96e74 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -3194,7 +3194,7 @@ efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
> struct efi_loaded_image_obj *image_obj =
> (struct efi_loaded_image_obj *)image_handle;
> efi_status_t ret;
> - void *info;
> + struct efi_loaded_image *info;
> efi_handle_t parent_image = current_image;
> efi_status_t exit_status;
> struct jmp_buf_data exit_jmp;
> @@ -3212,7 +3212,7 @@ efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
> return EFI_EXIT(EFI_SECURITY_VIOLATION);
>
> ret = EFI_CALL(efi_open_protocol(image_handle, &efi_guid_loaded_image,
> - &info, NULL, NULL,
> + (void **)&info, NULL, NULL,
We don't really need the cast here
> EFI_OPEN_PROTOCOL_GET_PROTOCOL));
> if (ret != EFI_SUCCESS)
> return EFI_EXIT(EFI_INVALID_PARAMETER);
> @@ -3266,7 +3266,8 @@ efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
>
> current_image = image_handle;
> image_obj->header.type = EFI_OBJECT_TYPE_STARTED_IMAGE;
> - EFI_PRINT("Jumping into 0x%p\n", image_obj->entry);
> + EFI_PRINT("Starting image loaded at 0x%p, entry point 0x%p\n",
> + info->image_base, image_obj->entry);
> ret = EFI_CALL(image_obj->entry(image_handle, &systab));
>
> /*
> --
> 2.47.1
>
With or without the cast removed
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list