diff options
Diffstat (limited to 'src/interface/efi/efi_init.c')
| -rw-r--r-- | src/interface/efi/efi_init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interface/efi/efi_init.c b/src/interface/efi/efi_init.c index 93ada21d4..cfaff606e 100644 --- a/src/interface/efi/efi_init.c +++ b/src/interface/efi/efi_init.c @@ -35,6 +35,9 @@ EFI_LOADED_IMAGE_PROTOCOL *efi_loaded_image; /** System table passed to entry point */ EFI_SYSTEM_TABLE *efi_systab; +/** EFI shutdown is in progress */ +int efi_shutdown_in_progress; + /** Event used to signal shutdown */ static EFI_EVENT efi_shutdown_event; @@ -50,6 +53,13 @@ static EFI_STATUS EFIAPI efi_unload ( EFI_HANDLE image_handle ); */ static EFIAPI void efi_shutdown_hook ( EFI_EVENT event __unused, void *context __unused ) { + + /* Mark shutdown as being in progress, to indicate that large + * parts of the system (e.g. timers) are no longer functional. + */ + efi_shutdown_in_progress = 1; + + /* Shut down iPXE */ shutdown_boot(); } |
