From patchwork Mon Jan 31 09:18:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 538478 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1560572imr; Mon, 31 Jan 2022 01:18:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyP9kHJVYdzE1ObIo47hqm/Nz7065FpDpRh3UU7ZFImR5vTvYpgVhoo71uO7Cjom+5sJsMr X-Received: by 2002:aa7:d4c1:: with SMTP id t1mr20112842edr.207.1643620733461; Mon, 31 Jan 2022 01:18:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643620733; cv=none; d=google.com; s=arc-20160816; b=s5hCJbYaSaIMRCRwNTd/5w37GXNkIfzV2NhesUTI+vrd+0fPL4LSWlsKxixZosqbOz Zpc5EFEjV4KGJs9izM/KFMEazCgNqMJWiqLOf9N8GUuOwoEdq7D6/XfXL9D3cH4AWsXK opdAUcsCOUkO/bQDH7hhLwAoe5vrrxuAKqL8r0aBnUzE0s0z4qd6XlSC4rYhjLQyva24 5o5+2LCaD0ZbYeMWLA1GGpA/X3IIC7UZH/H4rafpn5wkRUddfUpNV+rO/BI2gviNbxYr 6F4TFRTjk3Hc1esi9B5NRLbxb/eiTSIz/CLjhtizY6gybpQ70nmFUTsq+FLetacllGVG QgGQ== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=nvSWlZ9qg4lkuRqX/awH5ZBIsne97tOOPozYcHvWmFM=; b=y3z8kOWEjzIJbVAvAPEG6XO8FVDKBrDMzz6IJykXW3pa5Jp4nY1oj22I/0eQv/i+jE suYfxJhevemGU4rw1CgiwwEkj5fAnzXNHJhmCyTvsIm8/BcPEVg+FU6jad/2lcrTPAGx glYhy2lZrYm3RxZoWlAlomxKzv7e1vBwZNdrI//LNqH3ZWiy+jiiIV/srVJ8mk5LrIJU DCJ3LbdBW/Pz+gydgf8ByzN+kPVo49XSzXkT8t7Q7ByyIRN6TtMMfpnIJvSTK/UPrNbG iq1LTkCVrII1/8YjIjoPUd4ZHf6O+FA7cEyJMtmvAtnHuIDHfYSf4NOX78o4ZQGk524V O1wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K3yXNWK2; 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 nc3si7422496ejc.272.2022.01.31.01.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 01:18:53 -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=K3yXNWK2; 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 87C91805F9; Mon, 31 Jan 2022 10:18:50 +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="K3yXNWK2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 50A3980636; Mon, 31 Jan 2022 10:18:49 +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-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (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 47D8C8002A for ; Mon, 31 Jan 2022 10:18:46 +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-x52f.google.com with SMTP id s16so11581215pgs.13 for ; Mon, 31 Jan 2022 01:18:46 -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:user-agent:mime-version :content-transfer-encoding; bh=nvSWlZ9qg4lkuRqX/awH5ZBIsne97tOOPozYcHvWmFM=; b=K3yXNWK2W98h3pZCR/T1Mne7izrY6HkS+AG+R9hTy6+LCHos4zz+92S1fv4Uarmlmu cy3jr4e2GHTz9gqsSgdS8uxDwNAkJk9nKuSWUM9laihnj/ogZPc6ZL2axaucUnVvNOLN 8TnKg/GosN7IcanoUi5rBE4GenGJ2uqfdsVioRpBPLULdm62Sf7OXjl/XtSYHzOwtdM5 RovEyhIKhIIjRsO/6+PKZ/1o4/DOaKuQx1eHueeJUj8nhTWTdVHaEzflE/BSW2uq4TVR cV8AckNPAtDTZ7XxSOWkq+MJZj+LkB4ta8SB91163ZgtBc4ZCLtaxEUZwbwgbkuG02bV 6pxg== 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:user-agent :mime-version:content-transfer-encoding; bh=nvSWlZ9qg4lkuRqX/awH5ZBIsne97tOOPozYcHvWmFM=; b=d8CqK9UZ4jJp8lZxeg49FSBTfsXfwC2BTV6y07Aoiae6NXXM3JjWP9ZcUo6/a27k/B FFY2HrDr+1e17A0tjslR3BjwtNIIv7SqhQbPvIbiu+Ez9ilABaAtOIvNH4zZgNXOCb/6 ZoSj8Kpm/rKNhd/uhrTWNRlrsEf/aTT1+DNEj2jSxLzpR8d9SeLRcpfM6wrLpVafz9Lk XigIBvlsG6PKNwLHeUTF/wrTizqEtp1Ddl9ylU9SnVO+FxGNdh3sT0Y52MFj+QtXnWWg IX0na+CjS9o5DXKnv1Nzi3axBhvmtXZ4/FxY9BRQckCqnBaXRqA7PerAzom46VAmy5LV YrGA== X-Gm-Message-State: AOAM532/Ul4DyXIL4pweEAJTFzbqi4qkIoKh0d0Vta+Xew3aNf8OfU97 AME363pM15NxdHVlfK1Pr/yML1nLEYROog== X-Received: by 2002:a63:e314:: with SMTP id f20mr15898129pgh.577.1643620724390; Mon, 31 Jan 2022 01:18:44 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id t1sm17905421pfj.115.2022.01.31.01.18.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 01:18:43 -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 0/2] EFI: Reset system after capsule-on-disk Date: Mon, 31 Jan 2022 18:18:39 +0900 Message-Id: <164362071931.312714.14793570668139727572.stgit@localhost> X-Mailer: git-send-email 2.25.1 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 Hi, According to Takahiro's suggestion and discussion, I made a patchset to update the EFI capsule-on-disk, so that it does not use UpdateCapsule() EFI API and reset after completing the capsule-on-disk. The reset after completing the capsule-on-disk is stated in the UEFI specification 2.9, section 8.5.5 "Delivery of Capsules via file on Mass Storage device" as below, In all cases that a capsule is identified for processing the system is restarted after capsule processing is completed. Note that this feature is enabled by CONFIG_EFI_RESET_AFTER_CAPSULE_ON_DISK. If you want to keep the current firmware runs after capsule-on-disk (e.g. for debugging), you can configure it disabled. Thank you, --- Masami Hiramatsu (2): efi_loader: Avoid using efi_update_capsule() from update capsule on disk efi_loader: Reset system after CapsuleUpdate on disk lib/efi_loader/Kconfig | 10 ++++++++++ lib/efi_loader/efi_capsule.c | 18 +++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) -- Masami Hiramatsu