]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: Use sysreset instead of reset command
authorMasami Hiramatsu <masami.hiramatsu@linaro.org>
Mon, 21 Mar 2022 13:37:56 +0000 (22:37 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 9 Apr 2022 19:06:31 +0000 (21:06 +0200)
Use sysreset_walk_halt() directly from reset-after-capsule-on-disk
feature to reboot (cold reset) machine instead of using reset command
interface, since this is not a command.
Note that this will make CONFIG_EFI_CAPSULE_ON_DISK depending on
the CONFIG_SYSRESET.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/efi_loader/Kconfig
lib/efi_loader/efi_capsule.c

index 759cd2a2ca8e6cd904f824338039999ee49e312c..559b95a599b981040180638c07ab3f01147b6722 100644 (file)
@@ -136,6 +136,7 @@ config EFI_RUNTIME_UPDATE_CAPSULE
 
 config EFI_CAPSULE_ON_DISK
        bool "Enable capsule-on-disk support"
+       depends on SYSRESET
        select EFI_HAVE_CAPSULE_SUPPORT
        help
          Select this option if you want to use capsule-on-disk feature,
index 66abc30ed2affd64a226963659b2e85b5481b169..a107f285ddf0930c9e2c5752d92583d12455a95a 100644 (file)
@@ -18,6 +18,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <sort.h>
+#include <sysreset.h>
 #include <asm/global_data.h>
 
 #include <crypto/pkcs7.h>
@@ -1157,9 +1158,9 @@ efi_status_t efi_launch_capsules(void)
         * UEFI spec requires to reset system after complete processing capsule
         * update on the storage.
         */
-       log_info("Reboot after firmware update");
+       log_info("Reboot after firmware update.\n");
        /* Cold reset is required for loading the new firmware. */
-       do_reset(NULL, 0, 0, NULL);
+       sysreset_walk_halt(SYSRESET_COLD);
        hang();
        /* not reach here */