aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interface/efi/efidrvprefix.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/interface/efi/efidrvprefix.c b/src/interface/efi/efidrvprefix.c
index f9bfa4c..ac7d943 100644
--- a/src/interface/efi/efidrvprefix.c
+++ b/src/interface/efi/efidrvprefix.c
@@ -34,6 +34,8 @@ FILE_LICENCE ( GPL2_OR_LATER );
*/
EFI_STATUS EFIAPI _efidrv_start ( EFI_HANDLE image_handle,
EFI_SYSTEM_TABLE *systab ) {
+ EFI_BOOT_SERVICES *bs;
+ EFI_TPL saved_tpl;
EFI_STATUS efirc;
/* Initialise stack cookie */
@@ -43,10 +45,17 @@ EFI_STATUS EFIAPI _efidrv_start ( EFI_HANDLE image_handle,
if ( ( efirc = efi_init ( image_handle, systab ) ) != 0 )
return efirc;
+ /* Raise TPL */
+ bs = efi_systab->BootServices;
+ saved_tpl = bs->RaiseTPL ( TPL_CALLBACK );
+
/* Initialise iPXE environment */
initialise();
startup();
+ /* Restore TPL */
+ bs->RestoreTPL ( saved_tpl );
+
return 0;
}