From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDB85C433EF for ; Mon, 21 Mar 2022 13:38:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BF6183B0E; Mon, 21 Mar 2022 14:38:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="iHvc4Oiz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6B08283B20; Mon, 21 Mar 2022 14:38:10 +0100 (CET) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A70FC83B0E for ; Mon, 21 Mar 2022 14:38:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pg1-x536.google.com with SMTP id d76so1018666pga.8 for ; Mon, 21 Mar 2022 06:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=aigltwAw4OIwEArx+jLosQqqu01GixHEWWIeE336u1k=; b=iHvc4OizGRUlQu9r/XFy+Byq4y9L1wI8r4R1BbMooTdm7xGXOV7FDMvl1E5SVH86AW hz3bLWBZx/fimKZrFYwGzx6s/XgTXlBNDzApBU45HaTbxKEA8wnGI/4x1UDbkBs6Kuo5 D8b+LFpYhNochxXcSWsnZcZupW6yQt5dZEc9bdcgg3wsI3DU69/uqI8LtpYUN8G17x5A TprAEaPQYr7AOfBNxembhTuCXd1kGZqVYTyEy0ZElqBY/R+sUvSMyxeo9qcJn5ssNF3/ ctlqfWttKtF7e8UHVROGOk9RlnjbXKNEt25IPFs7WgBxy3hb+GP0iH7J/DewFzXv2xNC JqgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=aigltwAw4OIwEArx+jLosQqqu01GixHEWWIeE336u1k=; b=jR6TZHUdsnUZgvLi8rHw8jsxTUCsZmx4hfL9FpIeilenfLdlFXRrOMQo1B7Rv6epYN 05dFifSypbr+ptWUOsXJ2JirDtXDV9dNfZALw1m2l53iyApJvEekJP6OUG1vJjc04m6N fbmOLeGm5hbXpL+Yu6jwbW9RgEK0fJoD5gynSTTFEAIzfH6jpEfpqsE0uY1eWq7J/3Wr 4QLHVha0w+01VbvHcJ/2jTzR7G8BQfsSDRxsZKn0KVyE0pbtDC/eagl74fHtZ6QqjEyg ShBzYMg4yvUM0Gv1ogxvpS4LltPtKeVnLKFmQgCmg5UuOBJnJVek4pHEmt7dtXGFJi7W mzvw== X-Gm-Message-State: AOAM532bUVsj1ZqDMHwd10GS5illy/rmSQbollbWCdS4gbsOyOvwMe2z odvKprZr+LzjPmaoS4umT5xgFjDAzhb1Dw== X-Google-Smtp-Source: ABdhPJx93LBY1tZXQDBtM63Pgxp0FJKk3CTraBLmQ0RYPo/sr3a8ilyYCy73as7WjlnrBh/qYmOaCg== X-Received: by 2002:aa7:8896:0:b0:4f7:b8f7:772e with SMTP id z22-20020aa78896000000b004f7b8f7772emr23327721pfe.62.1647869880682; Mon, 21 Mar 2022 06:38:00 -0700 (PDT) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id c21-20020a637255000000b003822e80f132sm8889326pgn.12.2022.03.21.06.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 06:38:00 -0700 (PDT) From: Masami Hiramatsu To: u-boot@lists.denx.de, Simon Glass Cc: Masami Hiramatsu , Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu Subject: [PATCH v3 3/3] efi_loader: Use sysreset instead of reset command Date: Mon, 21 Mar 2022 22:37:56 +0900 Message-Id: <164786987597.412493.4093936383155532813.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164786984495.412493.4209842889853239285.stgit@localhost> References: <164786984495.412493.4209842889853239285.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- Changes in v2: - Add CONFIG_SYSRESET dependency. - Fix to add #include --- lib/efi_loader/Kconfig | 1 + lib/efi_loader/efi_capsule.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index e5e35fe51f..33138237cc 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -130,6 +130,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, diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 9fd6f78ad9..c6585cb113 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -1150,9 +1151,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 */