]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: check timer events in Stall()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 2 Jun 2019 19:12:17 +0000 (21:12 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 4 Jun 2019 20:09:26 +0000 (22:09 +0200)
During a call to Stall() we should periodically check for timer events.

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

index 027bd6d4d32146f3dbd08afc433770bc6abcb409..fed8d47adec07745416cbed7af7fdca42e47e326 100644 (file)
@@ -1947,8 +1947,14 @@ out:
  */
 static efi_status_t EFIAPI efi_stall(unsigned long microseconds)
 {
+       u64 end_tick;
+
        EFI_ENTRY("%ld", microseconds);
-       udelay(microseconds);
+
+       end_tick = get_ticks() + usec_to_tick(microseconds);
+       while (get_ticks() < end_tick)
+               efi_timer_check();
+
        return EFI_EXIT(EFI_SUCCESS);
 }