efi_loader: RestoreTPL should execute queued events
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 24 Mar 2018 17:40:21 +0000 (18:40 +0100)
committerAlexander Graf <agraf@suse.de>
Wed, 4 Apr 2018 09:04:00 +0000 (11:04 +0200)
When the TPL is lowered queued events may become eligible for execution.

iPXE uses the following pattern to request event execution:

bs->RestoreTPL ( TPL_APPLICATION );
bs->RaiseTPL ( TPL_CALLBACK );

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_boottime.c

index 1ff0568..fd35ffa 100644 (file)
@@ -278,6 +278,11 @@ static void EFIAPI efi_restore_tpl(efi_uintn_t old_tpl)
        if (efi_tpl > TPL_HIGH_LEVEL)
                efi_tpl = TPL_HIGH_LEVEL;
 
+       /*
+        * Lowering the TPL may have made queued events eligible for execution.
+        */
+       efi_timer_check();
+
        EFI_EXIT(EFI_SUCCESS);
 }