mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-30 00:20:44 +09:00
efi_loader: Call Exit() on return from payload in StartImage()
When a UEFI payload just returns instead of calling the Exit() callback, we handle that in efi_do_enter() and call Exit on its behalf, so that the loaded_image->exit_status value is correct. We were missing that logic in StartImage(). Call it there too. Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
c8df80c514
commit
56672bf52e
@ -1578,8 +1578,13 @@ static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
|
|||||||
|
|
||||||
ret = EFI_CALL(entry(image_handle, &systab));
|
ret = EFI_CALL(entry(image_handle, &systab));
|
||||||
|
|
||||||
/* Should usually never get here */
|
/*
|
||||||
return EFI_EXIT(ret);
|
* Usually UEFI applications call Exit() instead of returning.
|
||||||
|
* But because the world doesn not consist of ponies and unicorns,
|
||||||
|
* we're happy to emulate that behavior on behalf of a payload
|
||||||
|
* that forgot.
|
||||||
|
*/
|
||||||
|
return EFI_CALL(systab.boottime->exit(image_handle, ret, 0, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user