diff options
author | Tom Rini <trini@konsulko.com> | 2022-02-26 10:21:39 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-02-26 10:21:39 -0500 |
commit | a900c7f8161b74fc66ec715e68e7244b53f04298 (patch) | |
tree | b5e161da65f1c397a6465a875e7e1a352ab83208 /cmd/bootefi.c | |
parent | 7228ef94824c6442546431582dad0e3794264501 (diff) | |
parent | 3fa9ed9ae3b30dd6e7f5e887c76d183ad72a44a2 (diff) |
Merge tag 'efi-2022-04-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-04-rc3
Documentation:
* add man-page for fatload
* add SMBIOS table page
UEFI:
* partial fix for UEFI secure boot with intermediate certs
* disable watchdog when returning to command line
* reset system after capsule update
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r-- | cmd/bootefi.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 94d18ca73fa..46eebd5ee22 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -353,6 +353,19 @@ static efi_status_t do_bootefi_exec(efi_handle_t handle, void *load_options) /* On ARM switch from EL3 or secure mode to EL2 or non-secure mode */ switch_to_non_secure_mode(); + /* + * The UEFI standard requires that the watchdog timer is set to five + * minutes when invoking an EFI boot option. + * + * Unified Extensible Firmware Interface (UEFI), version 2.7 Errata A + * 7.5. Miscellaneous Boot Services - EFI_BOOT_SERVICES.SetWatchdogTimer + */ + ret = efi_set_watchdog(300); + if (ret != EFI_SUCCESS) { + log_err("ERROR: Failed to set watchdog timer\n"); + goto out; + } + /* Call our payload! */ ret = EFI_CALL(efi_start_image(handle, &exit_data_size, &exit_data)); if (ret != EFI_SUCCESS) { @@ -366,11 +379,15 @@ static efi_status_t do_bootefi_exec(efi_handle_t handle, void *load_options) efi_restore_gd(); +out: free(load_options); if (IS_ENABLED(CONFIG_EFI_LOAD_FILE2_INITRD)) efi_initrd_deregister(); + /* Control is returned to U-Boot, disable EFI watchdog */ + efi_set_watchdog(0); + return ret; } |