mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
efi_loader: rework bootmgr/bootefi using load_image API
In the current implementation, bootefi command and EFI boot manager don't use load_image API, instead, use more primitive and internal functions. This will introduce duplicated code and potentially unknown bugs as well as inconsistent behaviours. With this patch, do_efibootmgr() and do_boot_efi() are completely overhauled and re-implemented using load_image API. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Use efi_root as parent handle for the loaded image. LoadImage() should be called with BootPolicy = true by the boot manager. Avoid duplicate free_pool(). Eliminate variable memdp which is not needed after anymore due to "efi_loader: correctly split device path of loaded image". Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
1e15a9cb7f
commit
6b95b38c41
@@ -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)
|
||||
{
|
||||
@@ -2656,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));
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user