aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJonathan Gray2017-03-12 19:26:06 +1100
committerAlexander Graf2017-07-03 13:48:51 +0200
commit37a980b3fa0b0ad26b16b7b9b9dbb25b0075a06b (patch)
tree738a96e8b984bb7785b1ebbb5aaf36c02f1820e8 /lib
parent85a6e9b3c9d16ec062a6da3129448f39aad94fc9 (diff)
efi_loader: run CreateEvent() notify function based on flags
The UEFI specification states that the tpl, function and context arguments are to be ignored if neither EVT_NOTIFY_WAIT or EVT_NOTIFY_SIGNAL are specified. This matches observed behaviour with an AMI EDK2 based UEFI implementation. Skip calling the notify function if neither flag is present. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Acked-By: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_boottime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 51080cbeed2..eb5946a9594 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -210,7 +210,9 @@ void efi_timer_check(void)
/* Triggering! */
if (efi_event.trigger_type == EFI_TIMER_PERIODIC)
efi_event.trigger_next += efi_event.trigger_time / 10;
- efi_event.notify_function(&efi_event, efi_event.notify_context);
+ if (efi_event.type & (EVT_NOTIFY_WAIT | EVT_NOTIFY_SIGNAL))
+ efi_event.notify_function(&efi_event,
+ efi_event.notify_context);
}
WATCHDOG_RESET();