diff options
author | Tom Rini <trini@konsulko.com> | 2019-05-13 07:13:28 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-05-13 07:13:28 -0400 |
commit | 90176e3be63802bc8630bab651d169993f0f0763 (patch) | |
tree | e60a40154429aeb1bfcdae87649456ee2683bd4a /lib/efi_loader/efi_boottime.c | |
parent | d2d8f73da4b648ad21b1afb481f0bcd035ebe029 (diff) | |
parent | e2d82f8b2a91fb3fa78345f935a93a6db575effa (diff) |
Merge tag 'efi-2019-07-rc3' of git://git.denx.de/u-boot-efi
Pull request for UEFI sub-system for v2019.07-rc3
The development target for the UEFI sub-system is EBBR compliance. We have
already implemented some further protocols to enable running the UEFI Shell
and the UEFI SCT test suite.
As some boards are severely memory constrained make some of these extras
customizable.
Provide bug fixes. The most prominent ones let us pass the UEFI SCT memory
allocation tests.
Diffstat (limited to 'lib/efi_loader/efi_boottime.c')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index b97d55cb451..ec6f5758ded 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -181,10 +181,12 @@ static void efi_queue_event(struct efi_event *event, bool check_tpl) /* Check TPL */ if (check_tpl && efi_tpl >= event->notify_tpl) return; + event->is_queued = false; EFI_CALL_VOID(event->notify_function(event, event->notify_context)); + } else { + event->is_queued = false; } - event->is_queued = false; } /** @@ -513,10 +515,8 @@ efi_status_t efi_remove_protocol(const efi_handle_t handle, ret = efi_search_protocol(handle, protocol, &handler); if (ret != EFI_SUCCESS) return ret; - if (guidcmp(handler->guid, protocol)) - return EFI_INVALID_PARAMETER; if (handler->protocol_interface != protocol_interface) - return EFI_INVALID_PARAMETER; + return EFI_NOT_FOUND; list_del(&handler->link); free(handler); return EFI_SUCCESS; @@ -1439,7 +1439,7 @@ static efi_status_t efi_locate_handle( *buffer_size = size; - /* The buffer size is sufficient but there is not buffer */ + /* The buffer size is sufficient but there is no buffer */ if (!buffer) return EFI_INVALID_PARAMETER; @@ -2261,7 +2261,7 @@ static efi_status_t EFIAPI efi_locate_device_path( EFI_ENTRY("%pUl, %p, %p", protocol, device_path, device); - if (!protocol || !device_path || !*device_path || !device) { + if (!protocol || !device_path || !*device_path) { ret = EFI_INVALID_PARAMETER; goto out; } @@ -2294,6 +2294,10 @@ static efi_status_t EFIAPI efi_locate_device_path( /* Check if dp is a subpath of device_path */ if (memcmp(*device_path, dp, len_dp)) continue; + if (!device) { + ret = EFI_INVALID_PARAMETER; + goto out; + } *device = handles[i]; len_best = len_dp; } |