aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-02-04 23:05:13 +0100
committerAlexander Graf <agraf@suse.de>2018-02-10 00:24:00 +0100
commit9f0930e5d9c71a97b14f8993b3d3150a79b6a2ef (patch)
treeeed18f7dcd9d13fbb5bfc37f8c81c889888ffd0d /lib
parentae86b6be122f880224ba3e569d3e86d6b9553bb7 (diff)
downloadu-boot-9f0930e5d9c71a97b14f8993b3d3150a79b6a2ef.zip
u-boot-9f0930e5d9c71a97b14f8993b3d3150a79b6a2ef.tar.gz
u-boot-9f0930e5d9c71a97b14f8993b3d3150a79b6a2ef.tar.bz2
efi_loader: create stub for CreateEventEx
Currently we set the function pointer for the CreateEventEx boot service to NULL. When called this would lead to an immediate failure. A function stub is provided which handles the case that the boot service is called without an event group and returns EFI_UNSUPPORTED otherwise. Signed-off-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.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index da93498..2cea712 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -526,6 +526,38 @@ efi_status_t efi_create_event(uint32_t type, efi_uintn_t notify_tpl,
}
/*
+ * Create an event in a group.
+ *
+ * This function implements the CreateEventEx service.
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ * TODO: Support event groups
+ *
+ * @type type of the event to create
+ * @notify_tpl task priority level of the event
+ * @notify_function notification function of the event
+ * @notify_context pointer passed to the notification function
+ * @event created event
+ * @event_group event group
+ * @return status code
+ */
+efi_status_t EFIAPI efi_create_event_ex(uint32_t type, efi_uintn_t notify_tpl,
+ void (EFIAPI *notify_function) (
+ struct efi_event *event,
+ void *context),
+ void *notify_context,
+ efi_guid_t *event_group,
+ struct efi_event **event)
+{
+ EFI_ENTRY("%d, 0x%zx, %p, %p, %pUl", type, notify_tpl, notify_function,
+ notify_context, event_group);
+ if (event_group)
+ return EFI_EXIT(EFI_UNSUPPORTED);
+ return EFI_EXIT(efi_create_event(type, notify_tpl, notify_function,
+ notify_context, event));
+}
+
+/*
* Create an event.
*
* This function implements the CreateEvent service.
@@ -2851,6 +2883,7 @@ static const struct efi_boot_services efi_boot_services = {
.calculate_crc32 = efi_calculate_crc32,
.copy_mem = efi_copy_mem,
.set_mem = efi_set_mem,
+ .create_event_ex = efi_create_event_ex,
};