Commit 1884512b authored by Heinrich Schuchardt's avatar Heinrich Schuchardt
Browse files

efi_loader: allowable event types in CreateEventEx()



CreateEventEx() does not allow the following event types:

* EVT_SIGNAL_EXIT_BOOT_SERVICES
* EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE

This check is needed to pass the UEFI SCT conformance test.
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarAlexander Graf <agraf@csgraf.de>
parent 52cbac9b
...@@ -664,10 +664,26 @@ efi_status_t EFIAPI efi_create_event_ex(uint32_t type, efi_uintn_t notify_tpl, ...@@ -664,10 +664,26 @@ efi_status_t EFIAPI efi_create_event_ex(uint32_t type, efi_uintn_t notify_tpl,
efi_guid_t *event_group, efi_guid_t *event_group,
struct efi_event **event) struct efi_event **event)
{ {
efi_status_t ret;
EFI_ENTRY("%d, 0x%zx, %p, %p, %pUl", type, notify_tpl, notify_function, EFI_ENTRY("%d, 0x%zx, %p, %p, %pUl", type, notify_tpl, notify_function,
notify_context, event_group); notify_context, event_group);
return EFI_EXIT(efi_create_event(type, notify_tpl, notify_function,
notify_context, event_group, event)); /*
* The allowable input parameters are the same as in CreateEvent()
* except for the following two disallowed event types.
*/
switch (type) {
case EVT_SIGNAL_EXIT_BOOT_SERVICES:
case EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE:
ret = EFI_INVALID_PARAMETER;
goto out;
}
ret = efi_create_event(type, notify_tpl, notify_function,
notify_context, event_group, event);
out:
return EFI_EXIT(ret);
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment