From patchwork Thu Feb 3 09:23:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 539592 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp2253073imr; Thu, 3 Feb 2022 01:23:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwq8OTniK5XmzoraFDklVpU4TD/xZf1DgNjao5XyFf+tU3CQidrbmxux2kAHhevEz0ajgtK X-Received: by 2002:a50:a454:: with SMTP id v20mr34301168edb.176.1643880211590; Thu, 03 Feb 2022 01:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643880211; cv=none; d=google.com; s=arc-20160816; b=tJM36fNcVb/JyZLlJtQqEwwfB3ffy/7Fm9+tUtH+/HngoBHKLj9mhWGuOWYQVUhCig 0LjAKzk4IH+jXP1d4b9e9j5/QmhZYQzyEqU4D56wdasdU5fLMpIc77oxLZ9lEBXg42kU gqaSzNmVUUJyA4pew44jkL3Il4C0KOHn8qB+tG67dSGKcqGoZV1gn1YKlH9StbYVc/OI qE4pdU4NEiWK9SRH7lvtIHghcRXii8KZJxVWiLJ56yTE8YseVG5xpD/7e9QnOOwjsaeX eU2Rkzi72wuoJSmxgY5BqTlqZuhs7gBNpSTOqXROkmGvoXXZ6L87Ecjolh1UxvRLEr0E WVpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=l8NJ6lrbfovrBaFtwSDKYsM8LpZ8Hu6stUBjuanUvDA=; b=DaDKHJlq5uQFv5inThG7FecypeMCg6fde1fwzNLj2SCqdTfIdxwv78DAr7X88te+7Y c5yPq0vocPAVP1FOcBlGapPM40qCODx2EQk0o5vGX7sjhEOgUqWqnMcDsmapGoGR9VNa 6yK4j+DsBIteV5nEQNWRyDEJ3rdC2BB1zpH521Gk1s650NCtgDx365JtsUmuSciAefAc pi0GudAlo/v8lIBS4f5oYStnj1MMvddr8JZKuy5aQenu22X1negP58JdAby6NsAPEVWr 595+7tKyJe9N/i+KWC7yZMc/pKu4QBMH4axk2SiINWvzSMSvBjEHKi1+2vab2nqdaK+b GdGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l6LCsfpy; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id z64si12530412ede.393.2022.02.03.01.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 01:23:31 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l6LCsfpy; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 69C7B838F9; Thu, 3 Feb 2022 10:23:30 +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="l6LCsfpy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5320483902; Thu, 3 Feb 2022 10:23:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 BA130839E8 for ; Thu, 3 Feb 2022 10:23:23 +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-pl1-x62b.google.com with SMTP id s6so1625538plg.12 for ; Thu, 03 Feb 2022 01:23:23 -0800 (PST) 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=l8NJ6lrbfovrBaFtwSDKYsM8LpZ8Hu6stUBjuanUvDA=; b=l6LCsfpyqBxLm11FOSRaapz8hOQqmS7qyok93wHwWMzlXPBvwrXkTIe7s4CtYl+WCS fWcFIAFcJZYW/lCg3032A+9NkQJf7o4q1h7ceiLtW2OqIHx33LCoFHMA8zq94FYhKmH6 lTNIkVGbY4Q4WMvYzW0J0TEPCF7edbk2F9uvF1IY3f9WWgRUWar8nxuHAmKm22+58DAW BN3rgKxt4lI3gLD+5QcEoLDWEdOER0jsVgx25JICeiQMHfMFy/OS4HvGfQiIFP7GH2Ce wWK1BYVv/sTjgJkTdivYbAOs1Pa/EQWQpr7vceLLyKQS/8Y8jihDa6XmtmSWocyA6siq Alsg== 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=l8NJ6lrbfovrBaFtwSDKYsM8LpZ8Hu6stUBjuanUvDA=; b=zUgZm0vcO6xHGKTa2DitrLyYKbZz+wNFAbTcwliNGMGpG1ZTq2dZZiZuBQNa+2CIcm ZkzqI4vbx32jgpiCkPiX8bIt641WHJ35V+05Tjn4xqzIUwCTjg8pom3xz/NFppe5dFek HIe/BGqWc9bQnKcrCWx7Rd6q+TknDamUo7uZZFUAJx2NiF/7J62cLnrjyym6pqje9Ccq tNeWzc348NeloQIV7eQre5iNvwsFQNTFXKe6/O3qOkY5BE6YN4kbz9IzeARDLr3O4G5Q so2mrur0590++wUpeyn7gdWwHxY/ZQzNA7Z1XCOpZXnHhQ4lA9qZcLaJmKbq56spcAxS JaMA== X-Gm-Message-State: AOAM531VoM2iDdrDCR7Ul0Pj+AHZPq3FXRecDsvB7b/8KzJXAXKGpK4q W7Nkh+aUEZEVr6IuxVy+9Oa1GSZSFYuzsg== X-Received: by 2002:a17:903:2093:: with SMTP id d19mr34454468plc.29.1643880201629; Thu, 03 Feb 2022 01:23:21 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id j3sm9198360pgs.0.2022.02.03.01.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 01:23:21 -0800 (PST) From: Masami Hiramatsu To: u-boot@lists.denx.de Cc: Masami Hiramatsu , Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Simon Glass , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu Subject: [PATCH v4 1/2] efi_loader: use efi_update_capsule_firmware() for capsule on disk Date: Thu, 3 Feb 2022 18:23:16 +0900 Message-Id: <164388019634.446835.18271480521485569016.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164388018493.446835.11931101380744085380.stgit@localhost> References: <164388018493.446835.11931101380744085380.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 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 Since the efi_update_capsule() represents the UpdateCapsule() runtime service, it has to handle the capsule flags and update ESRT. However the capsule-on-disk doesn't need to care about such things. Thus, the capsule-on-disk should use the efi_capsule_update_firmware() directly instead of calling efi_update_capsule(). This means the roles of the efi_update_capsule() and capsule-on-disk are different. We have to keep the efi_update_capsule() for providing runtime service API at boot time. Suggested-by: AKASHI Takahiro Signed-off-by: Masami Hiramatsu Reviewed-by: Heinrich Schuchardt --- Changes in v4: - Update patch description. --- lib/efi_loader/efi_capsule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 4463ae00fd..1ec7ea29ff 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -1118,7 +1118,7 @@ efi_status_t efi_launch_capsules(void) index = 0; ret = efi_capsule_read_file(files[i], &capsule); if (ret == EFI_SUCCESS) { - ret = EFI_CALL(efi_update_capsule(&capsule, 1, 0)); + ret = efi_capsule_update_firmware(capsule); if (ret != EFI_SUCCESS) log_err("Applying capsule %ls failed\n", files[i]); From patchwork Thu Feb 3 09:23:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 539593 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp2253132imr; Thu, 3 Feb 2022 01:23:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPVvThA7h0XEZdVTo/InWKW+kLTXBVD5sFj9KrYoV3B5RxDUZgFbj9ld0oUpnfH3GGf3iD X-Received: by 2002:a17:907:6d8e:: with SMTP id sb14mr29058322ejc.11.1643880220638; Thu, 03 Feb 2022 01:23:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643880220; cv=none; d=google.com; s=arc-20160816; b=MBeG14EGH34ZSeblMeVlACT1KgmgYeAy0PXRasfZfHkJSMTC+GaBPdL8OBOAak9Yl+ ek5FBJazZ5zPpilLqP+wpMt7I1OZfXdxTVrpkYxpagvJSZ0/D2XqRQjzB6xKhNBdfYoP QkD8WgWFoy30zdEYorKxP1n4aof3ohe0UKvz+tLxVm67RgA1vucgJbxZFBA46J9MFBj2 zFtLnFZf3U4fvVguBsEFfgG337rDzlI/NJj/jtdATVlUvz7wuHyQ60UzQygSXZCgAcAw yn+rsFUDn54Hdy9/V524R4jmIggbAizIyzNQR10VUUJGO95T8j1Nn+TeMxMhksGVVbyH f/qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=H5Of4TxnrkJMIdwUOhPI+GskPutF0nUsm1ak5Cuaego=; b=jyI7eKu2GWrX+ZL1jQ3+NxysK5pYsvfQ9/WB0t8yQNLCpBjnim+Sza8BakVcYpBfLH NUxAn76st3Wm6L94ni6GDRRmT8R2dW/Bpwhbo2ODhMCm74jIzL8ZdxiPfaM1r3qBJyqo q6KHTSx0fMc4puT7av3xwcLmNCpp0ZBlynU8lNdQFRjjyz3RbeEI53EGOneFWak3eeRA kkcj9lzcnXkMmJHFYpWdCTKbJxL6RLHgmBx1X/1R5bLDURA4+OrnxmZXO62tTIyW8PEy e+Urb9BdlFo2lZYCFFNQ9a6n+1eIletC55p/2nI/+r/Khb+8CmPjoERIOm5g9ofyCiug ql/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QzoCzT3s; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id f16si9357072edq.358.2022.02.03.01.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 01:23:40 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QzoCzT3s; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F5B483922; Thu, 3 Feb 2022 10:23:38 +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="QzoCzT3s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6B946839EF; Thu, 3 Feb 2022 10:23:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (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 09E0E838D3 for ; Thu, 3 Feb 2022 10:23:34 +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-pj1-x102b.google.com with SMTP id o64so1866897pjo.2 for ; Thu, 03 Feb 2022 01:23:33 -0800 (PST) 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=H5Of4TxnrkJMIdwUOhPI+GskPutF0nUsm1ak5Cuaego=; b=QzoCzT3spFeF1PZrr2OsM8Bw7DXksd6ALxuxDXS4XKNT8RLav99UoMBLqq/L4WAL9q 3QLp9oHkJ70Uujwq5nGz1KwtYpD0RH6c2iJIGVYcJlZK79DFQtWUyS7SEY5xOKXC05vA hVbDam3uC5PgSxXjSB1o1xbGUryy1JbmYdF5V0Z/85S0L9DxVgCtDuO1igK70kAB8xn1 9uEGeUzzOBUeIFtMw5ZUmR7OE+6FTKTH/xJxQXMXaRDlOzTE5YvKIbi+j6GmDOxmgj41 dTOKch/SijLaahBwtCdb0X3pU66wwNMfUy63iwZCEZOL06cgZ/rXg3w/2K4usrznvt67 tU4A== 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=H5Of4TxnrkJMIdwUOhPI+GskPutF0nUsm1ak5Cuaego=; b=mEw6R49oHyDzoTZdQEY7Ip/CXwtPggXhtTQJF9+/U31s9cn2IGfrlR3tFjGNLs9JNI zj5u2K7ybUz6lSzjCykFD8/HWhUNcdTv1yDrJF6De9SCQ1jY5S1xykikRxpnNfJLZIUN K5tfhlAGNawrUkfJPieT0KBpbPqHybP23RJSyOSqVPBlZV/cEZLi2Pc4PAuG4d/jDSId i3yxzgm/xkqKv/xoUPR+0K8n4d84RgczC34HJJIqA3w0bZcYK5O7ldLoZ0YSJ3F3tYLx Jahamj/6YUz0p4kLekepQawmr7uUKhsJ7THmewxT8ccTjrK1VqVOa59t+xqX6R/zK4gH 0LOA== X-Gm-Message-State: AOAM530zk9wm8l1UGiywNIrNoAE5z5Zs5nX9Wr3Rai5+6TVz/8RXjh5r NdZFNwtcRum2KXam8Wz1BiTKOWP6Q1aNqA== X-Received: by 2002:a17:903:1c6:: with SMTP id e6mr35484638plh.132.1643880212037; Thu, 03 Feb 2022 01:23:32 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id pg2sm10805383pjb.54.2022.02.03.01.23.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 01:23:31 -0800 (PST) From: Masami Hiramatsu To: u-boot@lists.denx.de Cc: Masami Hiramatsu , Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Simon Glass , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu Subject: [PATCH v4 2/2] efi_loader: Reset system after CapsuleUpdate on disk Date: Thu, 3 Feb 2022 18:23:27 +0900 Message-Id: <164388020701.446835.322529861013544459.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164388018493.446835.11931101380744085380.stgit@localhost> References: <164388018493.446835.11931101380744085380.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 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 Add a cold reset soon after processing capsule update on disk. This is required in UEFI specification 2.9 Section 8.5.5 "Delivery of Capsules via file on Mass Storage device" as; In all cases that a capsule is identified for processing the system is restarted after capsule processing is completed. This also reports the result of each capsule update so that the user can notice that the capsule update has been succeeded or not from console log. Signed-off-by: Masami Hiramatsu Reviewed-by: Heinrich Schuchardt --- Changes in v4: - Do not use sysreset because that is a warm reset. - Fix patch description. --- lib/efi_loader/efi_capsule.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 1ec7ea29ff..20d9490dbd 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -1120,8 +1121,11 @@ efi_status_t efi_launch_capsules(void) if (ret == EFI_SUCCESS) { ret = efi_capsule_update_firmware(capsule); if (ret != EFI_SUCCESS) - log_err("Applying capsule %ls failed\n", + log_err("Applying capsule %ls failed.\n", files[i]); + else + log_info("Applying capsule %ls succeeded.\n", + files[i]); /* create CapsuleXXXX */ set_capsule_result(index, capsule, ret); @@ -1142,6 +1146,16 @@ efi_status_t efi_launch_capsules(void) free(files[i]); free(files); - return ret; + /* + * UEFI spec requires to reset system after complete processing capsule + * update on the storage. + */ + log_info("Reboot after firmware update"); + /* Cold reset is required for loading the new firmware. */ + do_reset(NULL, 0, 0, NULL); + hang(); + /* not reach here */ + + return 0; } #endif /* CONFIG_EFI_CAPSULE_ON_DISK */