diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-23 19:07:00 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-23 19:07:00 -0500 |
commit | 69d29fe1c0aeb33f42633a75555d30b7921c02aa (patch) | |
tree | b3b960b8e0b89202e0f8389efc4c79bdc3299a49 /lib/efi_loader/efi_boottime.c | |
parent | e716c9022970dac9be15856a6651a07132463578 (diff) | |
parent | 8d0949b3ed6985377682d7ec260be07ef26ef6d4 (diff) |
Merge tag 'efi-2021-04-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2021-04-rc1-3
Bug fixes for UEFI sub-system:
* correct value of EFI_BLOCK_IO_PROTOCOL.Media.LastBlock
* correct GUID when closing of EFI_LOAD_FILE_PROTOCOL
* error handling in mkeficapsule tool
Bug fixes for FAT file system:
* consistent error handling for flush dir()
Diffstat (limited to 'lib/efi_loader/efi_boottime.c')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index b2cb0160c08..ce658a8e733 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -687,8 +687,15 @@ efi_status_t efi_create_event(uint32_t type, efi_uintn_t notify_tpl, return EFI_INVALID_PARAMETER; } + /* + * The UEFI specification requires event notification levels to be + * > TPL_APPLICATION and <= TPL_HIGH_LEVEL. + * + * Parameter NotifyTpl should not be checked if it is not used. + */ if ((type & (EVT_NOTIFY_WAIT | EVT_NOTIFY_SIGNAL)) && - (!notify_function || is_valid_tpl(notify_tpl) != EFI_SUCCESS)) + (!notify_function || is_valid_tpl(notify_tpl) != EFI_SUCCESS || + notify_tpl == TPL_APPLICATION)) return EFI_INVALID_PARAMETER; ret = efi_allocate_pool(pool_type, sizeof(struct efi_event), @@ -1990,10 +1997,7 @@ efi_status_t efi_load_image_from_path(bool boot_policy, if (ret != EFI_SUCCESS) efi_free_pages(addr, pages); out: - if (load_file_protocol) - EFI_CALL(efi_close_protocol(device, - &efi_guid_load_file2_protocol, - efi_root, NULL)); + EFI_CALL(efi_close_protocol(device, guid, efi_root, NULL)); if (ret == EFI_SUCCESS) { *buffer = (void *)(uintptr_t)addr; *size = buffer_size; |