From patchwork Wed Feb 2 13:54:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 539326 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1582484imr; Wed, 2 Feb 2022 05:55:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzF462yZ/ACysp1+tn3sV7j2LLQMM3GhdkBYvyC//GBWRf8HYgcGDVvtdc1xf7T3Hm9L3y6 X-Received: by 2002:a05:6402:5144:: with SMTP id n4mr30105934edd.285.1643810102735; Wed, 02 Feb 2022 05:55:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643810102; cv=none; d=google.com; s=arc-20160816; b=yv+o5Tl6fJbHMCtwMm5mMn+wwfaPmcEr3iwgzuvjqF4SR1onKdo+6biLmQSxFEnd60 xMxrBfMbShMQr84NpmHIWoISKd+QQYDYe63VbIOxA0XVkkQHR+AOTZtWC1+tJkmbpTkw VqLzS+6pteens2V/+TIuLk2Hc3fwcbgc0bl5ABeNqUPQL7t03bbHuHgoSwahBXiYpazY 4DYH5uc94orQZNcNVtoE6tj2AyONrLWEFpVjRsyBxEfWqAPsxwJdKfCL3wpSDbGitzwq 2y3dVhVguDwHNXfzHM3xGyFo0nHo8G5C5nDG9Rjj9nh4/9llw5QUYyYsp8BD8UMTLhF0 Ko3A== 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=GdDnwWdEJ9nsmtC9/E9CFaZrlgdm/njU3nPmztsNGW4=; b=y6GZR7E78PUFn4s0fuiCnzyTGsPsvZao+bf3sSjVcOenSVi6N3ZBqoRteLww+tb8if 460T1qnt7vycev7avwJghALCiZIOPl2g37PlJpljOsP2XFmNaHFLedBcw3s33cmnGd5H iI0/N8UgHzUB2YsRl2x6pzyRRbvYz7SJGYGX1GeHoOJQtr+UhUK0+JfXGajIZe3CmZlJ ADNPBHAgYx4gJRC7iWsgRdMVnTO74P8PrmtrgAXN2D04MjwwtqlTlzP5eYEGhYZtSbYo /D1/y/3PHOE6/aMblNEjHVA4npTgPwr5Qa2ZujTfqkTbPxy09LAgc+phtTtvZLm03sqI /zcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uzkRlzJk; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id p24si11824533ejn.56.2022.02.02.05.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 05:55:02 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uzkRlzJk; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 D12D8838D3; Wed, 2 Feb 2022 14:54:43 +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="uzkRlzJk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8B2A4838D6; Wed, 2 Feb 2022 14:54:42 +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-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) (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 5B412838D2 for ; Wed, 2 Feb 2022 14:54:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pl1-x634.google.com with SMTP id c9so18271359plg.11 for ; Wed, 02 Feb 2022 05:54:39 -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=GdDnwWdEJ9nsmtC9/E9CFaZrlgdm/njU3nPmztsNGW4=; b=uzkRlzJknGdT9V1e0fJuiJJkQGo6NTPoUAfuAi/WaiM3R0gwTKn8y19aIwHlFgusua 1J+EaZke7L3PxuGs5KcpDjPr4jsOTckp2K4DXwdFrZNtBKq48YHhsHJ0/exfsXGMqjk5 Z3KGbur6jj3ip8CpVxTabRfKpX4WyJcc6GienarGkbGQx8n5RQhFMJFLfVZBnV7JiZRR oTRXGgANNuYsyfGdHbs60+N0SEFUKyntR8ZzcFT8yKDVK2YRHF3ikTbxkT+QdMJ8uQyK 9Zu0Z1s1zoous5df8VWFjJCU3c4wScI6OSKX7+ozllQ/4xM8LuU5hfgV5RR/XG1tsdzy kv+Q== 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=GdDnwWdEJ9nsmtC9/E9CFaZrlgdm/njU3nPmztsNGW4=; b=gYSx8s7D9Sqhd/ztJNhJ9zyZf5+0R/oF2YIeHu/CIalMrilRXxm4Wrkvz/eiv0tumu iYXy6O0nZP23aFi5v9lOnhQsF8GPkn/3YssdtZp2b07qbDgB2/VMIJiuP7vuU/t4JHaJ BF68ZyJEuBqNvyroRtKpWfokadbobJS6mJzqlYp/fqYtTjOaHyW/NmhWWi2BS+iO2GW6 avl1rUbEQxB+QmkCcnOV6alrNa6/McIoPNnPhK34z9hdJmyKq4S7e0qcdeZJZArVhzua 5AvDkjlZs50HxHQoj9MJNEcw2LuBpaCbH4VRiGSZ1cxHc3ZWwR5zs9u5qHroYeWAxVXs 5lgA== X-Gm-Message-State: AOAM532Mj24XDfMo3/xmZh6KKSqBQKxPx5CBWm8tVHPsHdMlpXPiLx6D z9i/L7uLe5Nxffl4D7DtGyC+25ivsuxFZQ== X-Received: by 2002:a17:90a:564f:: with SMTP id d15mr8205514pji.238.1643810077633; Wed, 02 Feb 2022 05:54:37 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id g20sm4952833pfj.196.2022.02.02.05.54.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 05:54:37 -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 v2 1/2] efi_loader: use efi_update_capsule_firmware() for capsule on disk Date: Wed, 2 Feb 2022 22:54:33 +0900 Message-Id: <164381007304.420956.13072455526097288152.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164381006265.420956.16575397258903175632.stgit@localhost> References: <164381006265.420956.16575397258903175632.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 at boot time. Suggested-by: AKASHI Takahiro Signed-off-by: Masami Hiramatsu --- Changes in v3: - Update patch description. Changes in v2: - Fix to pass correct pointer to efi_capsule_update_firmware - Remove ESRT generation, because this part anyway will be removed next patch. --- 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 Wed Feb 2 13:54:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 539327 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1582638imr; Wed, 2 Feb 2022 05:55:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzl7nk/NkZVrJbuexb/yEnUNXf16HZ7d0vknAl7iWBi8gM/7EC7XxRudX0q4Qj0gYjhrDJw X-Received: by 2002:a17:906:6a28:: with SMTP id qw40mr25360112ejc.550.1643810117051; Wed, 02 Feb 2022 05:55:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643810117; cv=none; d=google.com; s=arc-20160816; b=QjbP3JAnJbk0J+y01ttICDEb5w06dDwq7g95e2KkAK3f5nE5RHQtcUFeAC4UsDZlKH f/cP0o/BMvUztJLB1pK3m0Aiq7UWeH2WKL9GQpvL/gdLyUtEmZu4tpp0xtYICQOFnKYz /QVQYQTLH6nhRyTlItvaxoIBVqc00zqnxdSEZ18g6Rb8aXp6jAbxPHvpZ2YTp16ipZki 0P0cm2BMb9sY1DGaFo5GSPmqTgQN7NF4BdnhP3cMQShpR41jACnTeamic/7e7Eh0NmrY nwAXes+dUDDg+GY0axBfMNYzK8bai74WaKigOFYosf45jVPsSRMJmdNhJt0rwQ4EYEpF uK6g== 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=oGE5JX9wD2IHETOmokvSfqHExlYTgw6LiDnI/ldGsj4=; b=sfRa2TjgyxQnPJzhy3YHoB7rYR3CkjXPcO6/wxQXJMhkiyyWFdAfYSjSxVaCSdrUu6 hcoQEVGp9kafZfpm5U2bs6WAaOw9EhHDNQGCaL/c7MrTsWuWkQAMwdUALZGCi7cYtSaw DisfBRpqSleedHvG72EdQfi/eO8aTRczIj4jdhfg9xln4cXmEjTnkKivLjSuuyvH6zAe AhXd67uiEogYBk8HGd6kJQOdldfdYzBDFT8mvlw8185wQkL7aqmJTnx49Ww8+pmE1fy8 PsSA+PXmuRSHZ+gK3SylBXOLCKYDzqgktEhGSI2K3NWWF/EEnvKIONUhufWW2N10EZfn jMLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kyW7aXvZ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id z67si11532734ede.475.2022.02.02.05.55.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 05:55:17 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kyW7aXvZ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 21B05838F5; Wed, 2 Feb 2022 14:55:05 +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="kyW7aXvZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 553F7838CC; Wed, 2 Feb 2022 14:55:02 +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-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (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 5BA0783902 for ; Wed, 2 Feb 2022 14:54:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pg1-x52e.google.com with SMTP id e16so18373930pgn.4 for ; Wed, 02 Feb 2022 05:54:54 -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=oGE5JX9wD2IHETOmokvSfqHExlYTgw6LiDnI/ldGsj4=; b=kyW7aXvZKVrNAu13SQ/d91B1g8+3DIiw5LysXEBUPwUeRDPn/sfjGfRPRFuhLFGG6d OePiOnSqHCEapuq93vdIvtQTE/JH1dIMuKyXlwYKOtTdffCxILJJxjrZ6mn45ZW/HXPh ogk1oDj7A97fsKTnGgodqgCGtnL48u3YMRZE0tGs72He+dkkkRPrywxjZVFygm+enjL/ 0uLboyO7IczISgoNuVSu4s1GOeBQoXw3KpqyqtxQCCqW9DMv9Sw7aRoXqaXivRzt9g2a FIJmMed8ujgeXksWs26pWVLMLF/9+9IBpl2mgg8rqBRB9AAUpsSW1pFV/nIOtO4w+zqs TGFg== 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=oGE5JX9wD2IHETOmokvSfqHExlYTgw6LiDnI/ldGsj4=; b=nAooXEOrc0ZmM1rK7yoW/gvQUw6d1R4imxjTNCnVlIwD8H1qopzKabtC3tMWhQZLG2 c5I5E04Vq14L7jXY+KwNO3JI63X9yQ8ojAFM6hffMzlodIyxnoOdaagKqKihVEwIKHOr POFBs8LA3C8Zz7/jaGDoiiK2atZwFA/mCbzrrR3cjtDOEABvcDDVUicSauz8JUjnaCJi 7MOXRVR9hYFTnzj3poMdI/pFgOGlwO5BjNIguffeCFW5HCfKB1itQnjYwR5viMurTL8x YaCNroxOiMcnZwCRwmkn2Bd0As/h3m1H3GDcMZp9rvlXHn8gpkT9ffGeB9hjhj3x5eFY JA9A== X-Gm-Message-State: AOAM533Z5bFnM7wpIE11qgaCtZUs68ZkIN/j+XdGMGRZCRNa7K6zXQob PRDqsd0CWb0fu8W4ilf/7HIDRd4+9ZeQbg== X-Received: by 2002:aa7:96c1:: with SMTP id h1mr29858910pfq.17.1643810087621; Wed, 02 Feb 2022 05:54:47 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id k3sm27534255pfu.180.2022.02.02.05.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 05:54:47 -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 v2 2/2] efi_loader: Reset system after CapsuleUpdate on disk Date: Wed, 2 Feb 2022 22:54:43 +0900 Message-Id: <164381008301.420956.13884226784193349269.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164381006265.420956.16575397258903175632.stgit@localhost> References: <164381006265.420956.16575397258903175632.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 config option to reset system 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 --- Changes in v3: - Log succeeded capsule update in info level. - Use sysreset if possible. - Use do_reset() and hang() instead of panic(). Changes in v2: - Remove kconfig option to disable this feature. - Use panic() instead of do_reset() so that if the reset fails, the machine halt. - Log the result of each capsule update always. --- lib/efi_loader/efi_capsule.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 1ec7ea29ff..ade9155042 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -14,9 +14,11 @@ #include #include #include +#include #include #include #include +#include #include #include @@ -1120,8 +1122,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 +1147,19 @@ 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. + */ + puts("Reboot after firmware update"); + if (CONFIG_IS_ENABLED(SYSRESET)) { + reset_cpu(); + } else { + do_reset(NULL, 0, 0, NULL); + hang(); + } + /* not reach here */ + + return 0; } #endif /* CONFIG_EFI_CAPSULE_ON_DISK */