efi_loader: Add exit support

Some times you may want to exit an EFI payload again, for example
to default boot into a PXE installation and decide that you would
rather want to boot from the local disk instead.

This patch adds exit functionality to the EFI implementation, allowing
EFI payloads to exit.

Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Alexander Graf 2016-05-20 23:28:23 +02:00 committed by Tom Rini
parent 97d44b1f5c
commit a86aeaf228
3 changed files with 32 additions and 5 deletions

View file

@ -17,6 +17,10 @@
#include <efi.h>
#ifdef CONFIG_EFI_LOADER
#include <asm/setjmp.h>
#endif
/* Types and defines for EFI CreateEvent */
enum efi_event_type {
EFI_TIMER_STOP = 0,
@ -239,6 +243,12 @@ struct efi_loaded_image {
unsigned int image_code_type;
unsigned int image_data_type;
unsigned long unload;
/* Below are efi loader private fields */
#ifdef CONFIG_EFI_LOADER
efi_status_t exit_status;
struct jmp_buf_data exit_jmp;
#endif
};
#define DEVICE_PATH_GUID \