From patchwork Mon Mar 21 13:37:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 553338 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1510564mag; Mon, 21 Mar 2022 06:37:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCtWbT/kjbm7rb5CnR1M5gC4iRR7+Nledm+i7bVseOYgMqs42v0+BPAjJO87qQ3LzmeraB X-Received: by 2002:aa7:d5c1:0:b0:419:113:3e2b with SMTP id d1-20020aa7d5c1000000b0041901133e2bmr19515854eds.237.1647869871680; Mon, 21 Mar 2022 06:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647869871; cv=none; d=google.com; s=arc-20160816; b=xJScEXQJ4pX5BRyhRou5Zo6GjMzhNl0eXjOSi02k1l29RMMdqF2J5NIjcWyfqZs5pt 9voz6y3kePHbi0NrusoISXr01as1SrrbQtIOGs0SWTSjs09ys4AbT6NTtdsT40Bqz7JF DgXHphEvFeaihf6Fe1WiiStVJHp2NIWjos3klgr9NpxAqWtdp6Rlawyq4aY3RcMDIXKr yr7br1KJmT7Hxi2RWju2LSggdQ0kQFk0lZIC9Embvirx2ULi93Us/ovlwgSxVcyvSBtg qn4A4Q9s5NtNb7QnhXOJ37byvCkZFssabLM6zD8gtk1w0ufluGGErV7MvzI7cWj05uK9 cEjA== 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=nm97opa7boGMjzGJjMYc6NfrqKMy8FzGRuPY4kdz+y4=; b=n8rakZpBOoRfuzEdmM7m5P9H1+Homxf9KnOLoRokQ/E7GriMEsPmkGApy93Rw0fhNd zu/T6lbSaTzqm1h+t2fTL+kA7Xvl9sWAkfvhON4GdtDeREyi4szAbU5a/tAJuC37RY4U 3vETMAUQ3kE7w1AfX1dhxtjoyi5r1oCdsxp+DXq7duRvhg9dVWH5wAU2BrWxeIFkfcqK SelBNh9j3Rc0gP3GqfHwR4dh0jxD0p5amCwO7sAUiRElVxpxqJfywRy32ZR6PLVWI2Qf m/CQ/9KtNzX8QBI/biNljbIK95Dc6I8qfgl5Mt6wAQNqFy6iqqr2zB7KWLkMc3N2MXJ+ CtQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IPNIHKOi; 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 lr8-20020a170906fb8800b006df76385c6asi2897190ejb.266.2022.03.21.06.37.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 06:37:51 -0700 (PDT) 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=IPNIHKOi; 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 DC9BE8269E; Mon, 21 Mar 2022 14:37:49 +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="IPNIHKOi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4AA9483951; Mon, 21 Mar 2022 14:37:47 +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-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 17A6B839B2 for ; Mon, 21 Mar 2022 14:37:42 +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-x102f.google.com with SMTP id e3so13034923pjm.5 for ; Mon, 21 Mar 2022 06:37:42 -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=nm97opa7boGMjzGJjMYc6NfrqKMy8FzGRuPY4kdz+y4=; b=IPNIHKOij3MzLRWeWmLLDYaVPtdwFiLXmvGauJT24ReSp42iDGdZGKnMPqFZHA84aT zeXrzbcWVJyK/od5Scs8hHdTuCDMahhiGV6UVMmVzCt6OO2ROLTHB3VokZyyyf3vBd77 DOPBwjzk1rpS3W7f0S8hvoV1insm16h1We4Uiu7At6D7Tbawtn1RxUS8UYvlpzsfoHhw ECvLlZUpyayPN+AQlHwso1+221WH5elH2dn5H/HW9RUp+2Dg4V4hFKcBOW0JKnV7eQoN jOtwaqtpzzYnIQ6XBAWyQnGEMay9UV7zfE43G5O9usnEzZ3tUhvWFT5K+q5KEk2oiJ54 Hstw== 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=nm97opa7boGMjzGJjMYc6NfrqKMy8FzGRuPY4kdz+y4=; b=dxTqJICka3jVfYC1wib3LaYBlbK8Kzp9OQmd7s/c5WNi7Q+FeUMBKuqQ6SsaA26RtZ LgZFtj1ra0Cn1a5ysJOIwii05r3zsc8UTNcvZnVwm/DVNX/S1KhxjSyx1E+YFYoMz6jR FDnwhfXLZU8w3ZY8wDq/8Hn1+Yal1GexHT38k7k93P1vt7V2KPNx1I/n/usG8eKPbRqG BWmf3PRJOmzzekPeDG4WWyeJdAmDqVc4/qgM1tidezxCG9w1Q6wjw6IBiatKEjgzvXfn bOaeI6PuJLR4FVlAnzS3XlXnbRPNZxDqb+ApBBIjD72CatLb8NsDwlAMXvD8ugZX0Kt8 5Hrg== X-Gm-Message-State: AOAM530ReU+BqYDeThO7LtwhDOvnm4AqYT4hs61O+X+wD5V5GQmGCxtT W7xhWtp3FCjxI+dTKq7ig/v0p3A9Y9BHwg== X-Received: by 2002:a17:902:cec8:b0:154:6dd6:255d with SMTP id d8-20020a170902cec800b001546dd6255dmr2120406plg.62.1647869860257; Mon, 21 Mar 2022 06:37:40 -0700 (PDT) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id g14-20020a63be4e000000b00382800d1528sm3631484pgo.21.2022.03.21.06.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 06:37:39 -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 1/3] cmd: efidebug: Disable 'capsule disk-update' when CONFIG_EFI_CAPSULE_ON_DISK=n Date: Mon, 21 Mar 2022 22:37:35 +0900 Message-Id: <164786985547.412493.7408749396405838912.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 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 Disable 'capsule disk-update' option for the efidebug command when CONFIC_EFI_CAPSULE_ON_DISK is disabled, because this option is available only when the EFI capsule update on disk is enabled. Signed-off-by: Masami Hiramatsu Suggested-by: Heinrich Schuchardt --- cmd/efidebug.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 401d13cc4c..a1a0717ecb 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -84,6 +84,7 @@ static int do_efi_capsule_update(struct cmd_tbl *cmdtp, int flag, return CMD_RET_SUCCESS; } +#ifdef CONFIG_EFI_CAPSULE_ON_DISK static int do_efi_capsule_on_disk_update(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) { @@ -93,6 +94,7 @@ static int do_efi_capsule_on_disk_update(struct cmd_tbl *cmdtp, int flag, return ret == EFI_SUCCESS ? CMD_RET_SUCCESS : CMD_RET_FAILURE; } +#endif /** * do_efi_capsule_show() - show capsule information @@ -303,8 +305,10 @@ static struct cmd_tbl cmd_efidebug_capsule_sub[] = { U_BOOT_CMD_MKENT(esrt, CONFIG_SYS_MAXARGS, 1, do_efi_capsule_esrt, "", ""), #endif +#ifdef CONFIG_EFI_CAPSULE_ON_DISK U_BOOT_CMD_MKENT(disk-update, 0, 0, do_efi_capsule_on_disk_update, "", ""), +#endif U_BOOT_CMD_MKENT(result, CONFIG_SYS_MAXARGS, 1, do_efi_capsule_res, "", ""), }; From patchwork Mon Mar 21 13:37:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 553339 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1510680mag; Mon, 21 Mar 2022 06:38:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwspwB/3B0JAKzaPbVF/5G+01OHXc9qBECrf56YmsM0v5k4yeJg4A9iPso4QfgVVE2Du274 X-Received: by 2002:a17:906:c111:b0:6db:cf0e:3146 with SMTP id do17-20020a170906c11100b006dbcf0e3146mr21025791ejc.280.1647869882436; Mon, 21 Mar 2022 06:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647869882; cv=none; d=google.com; s=arc-20160816; b=ZHR4iIACpcoxum/4aij+AkShLi37BcVCZWU+/rzr9fDPAoZ4mAfHsUxxqKVRV5DCVg UMEtZGos1IL7vWzVvG0hDskByl3P7IXBlwYv6/wZqBQoIThMp/NhfADWdZXGTJAdd6i1 WDLHsVzgyA7sXcLOQRrbcIWjSDlcHBkmEtSg2TYyUh8WzJ6jfVWRFGKBn3Kw59zxgmNd tay189tLdLgCxWVDwCf2FMGRmN723BMjZNweP/mIUPj7arA/KTe9h2lIJxfSczxqmFEn bRBbOHAmxs5sf1wy0VdaQemVioL6HS7ayxELOIPhg3Foe/t14QpA9RTvGTIY0+4CmEdu n6wA== 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=NAtfbNoiWIqOvID50l3qL1i+x8tOY5Kw0eMptFIz+Rg=; b=tONa2RRPOVYR4POzzw3/w2AbIwM+5PCOsfipATIj+Uxno9kJvzymviblGlypwScUS9 lCUxtc5N/HuhY2xy4KG5Ca5MTCggfsj4JbmaVi3mOJgkTvxPGRHvVGWclVvQKi6ou2kb KlXeGXzX73DUQhH/KDMKDzpEZpRV2THYTgk90pVpw3minuMU48pZQ0fXH2JGbY30tfnA PyrR3VxaiQvBfpUGle5YSYn4Zi8fCvvULZk6d3bu7EmuoL+JvcMsBQEsemI1GUk/ZNQQ 6kaqV1Z3EikcFuA9HhU1CL8ENafyyhiTCflz9DO/mythsXd8UY2l5OBS71Uheur+XpXC glfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qk1udowk; 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 hr29-20020a1709073f9d00b006df76385c74si8462696ejc.276.2022.03.21.06.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 06:38:02 -0700 (PDT) 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=qk1udowk; 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 4AA7383B19; Mon, 21 Mar 2022 14:37:58 +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="qk1udowk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 507AF83B15; Mon, 21 Mar 2022 14:37:56 +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-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (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 5D30F83AC8 for ; Mon, 21 Mar 2022 14:37:52 +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-x102e.google.com with SMTP id mz9-20020a17090b378900b001c657559290so14013794pjb.2 for ; Mon, 21 Mar 2022 06:37:52 -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=NAtfbNoiWIqOvID50l3qL1i+x8tOY5Kw0eMptFIz+Rg=; b=qk1udowkMJ9wRjKzYrTenwONXS+z+smEKo6O/MClWgspG7YalYpznraKFvctFkR/KL kU7iF0ldGGgi9/TWyVj0X0H/I1iEHTt4ShWcVipluhR5+CmSY9PHHVPwCoZUoT7bY2ME YjDAfOwIFryPjKMkkyyaDDnIgy4uHcTGyu5VTkWsF68os7+e5BsJOB/AcvwSOvOJcXHu ZAXWdkOCZ8V5pvpRxyhZvWFX2zdBLiTIDj3+Yd27glWiuLJw74EqOYVuWllO5fdTHArC nMUiVRDyJFiko/mpFxhcTlvQ/TMxOaiZYQ0eRvWVfTMXPG0k2x24FNN8N4CotIuYq+00 fheg== 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=NAtfbNoiWIqOvID50l3qL1i+x8tOY5Kw0eMptFIz+Rg=; b=p7CJwvLaNPXgqGchyIdYHs2BGKw9BwYSQuxQ/uk/qoLHnrYsbsq1aKeExHoFmBhd1m kafcXmAFlOu9VIsFqDPejQ8mqLxNSaXB68c67WHuzl+MN5Vbm4n0HIjIf5iusUkdpzg+ La7goi/ucEq+qrMxfo3hH1xZcvDIkEazQxKVevp7vPsCYqs9wtAdGzbErfGMtve1/6m0 WZJeKcrE6dprgaVKqgruddPPOgbtf/x4CXMtr4hs1dMTWQPasaJ/oOx9p9/phCFKnQ9A nbo1ipDlBCK3YbOXcf3CWnr5vUb047Nevuk2S83bF4GCEFl/0eyyxWzqn2m8YrSPZp6J 377g== X-Gm-Message-State: AOAM530O10Mi2WDbkw+r4NOAb/6610uny3Dw34149S348u+gZAsyIr7t gT9Wxmhw4hmGFVOPy37IT9WVR+CbwDI2FA== X-Received: by 2002:a17:90a:7181:b0:1bf:a024:ab61 with SMTP id i1-20020a17090a718100b001bfa024ab61mr26169515pjk.200.1647869870564; Mon, 21 Mar 2022 06:37:50 -0700 (PDT) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id lp4-20020a17090b4a8400b001bedba2df04sm17316491pjb.30.2022.03.21.06.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 06:37:50 -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 2/3] efi_loader: Make efi_load_capsule_drivers() available even if EFI_CAPSULE_ON_DISK=n Date: Mon, 21 Mar 2022 22:37:45 +0900 Message-Id: <164786986566.412493.9219227328802655993.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 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 Make efi_load_capsule_drivers() available even if EFI_CAPSULE_ON_DISK is disabled because the caller (efi_init_obj_list()) expects it only relays on EFI_HAVE_CAPSULE_SUPPORT. Signed-off-by: Masami Hiramatsu Suggested-by: Heinrich Schuchardt --- lib/efi_loader/efi_capsule.c | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 613b531b82..9fd6f78ad9 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -619,6 +619,36 @@ out: return EFI_EXIT(ret); } +/** + * efi_load_capsule_drivers - initialize capsule drivers + * + * Generic FMP drivers backed by DFU + * + * Return: status code + */ +efi_status_t __weak efi_load_capsule_drivers(void) +{ + __maybe_unused efi_handle_t handle; + efi_status_t ret = EFI_SUCCESS; + + if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_FIT)) { + handle = NULL; + ret = EFI_CALL(efi_install_multiple_protocol_interfaces( + &handle, &efi_guid_firmware_management_protocol, + &efi_fmp_fit, NULL)); + } + + if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) { + handle = NULL; + ret = EFI_CALL(efi_install_multiple_protocol_interfaces( + &handle, + &efi_guid_firmware_management_protocol, + &efi_fmp_raw, NULL)); + } + + return ret; +} + #ifdef CONFIG_EFI_CAPSULE_ON_DISK /** * get_dp_device - retrieve a device path from boot variable @@ -1007,36 +1037,6 @@ static void efi_capsule_scan_done(void) bootdev_root = NULL; } -/** - * efi_load_capsule_drivers - initialize capsule drivers - * - * Generic FMP drivers backed by DFU - * - * Return: status code - */ -efi_status_t __weak efi_load_capsule_drivers(void) -{ - __maybe_unused efi_handle_t handle; - efi_status_t ret = EFI_SUCCESS; - - if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_FIT)) { - handle = NULL; - ret = EFI_CALL(efi_install_multiple_protocol_interfaces( - &handle, &efi_guid_firmware_management_protocol, - &efi_fmp_fit, NULL)); - } - - if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) { - handle = NULL; - ret = EFI_CALL(efi_install_multiple_protocol_interfaces( - &handle, - &efi_guid_firmware_management_protocol, - &efi_fmp_raw, NULL)); - } - - return ret; -} - /** * check_run_capsules() - check whether capsule update should run * From patchwork Mon Mar 21 13:37:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 553340 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1510859mag; Mon, 21 Mar 2022 06:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOmnxKeZCPYWPUt26E+YIz6GxYtLzqyd73DVTjzm4ncLZCghgzhdihG28ksFPX4vCtfplC X-Received: by 2002:a17:906:9b93:b0:6da:6388:dc57 with SMTP id dd19-20020a1709069b9300b006da6388dc57mr20541673ejc.338.1647869896365; Mon, 21 Mar 2022 06:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647869896; cv=none; d=google.com; s=arc-20160816; b=SOhAUMxaAqVgCi16RkL0oVypR/ew9Vyuv6JuyL8S4NRpIRkW+QtFUdOrUqNpKa504g Cu0hNYdg0eWyugKjHdBuADBafZw51oL7hxuQvZXmL6gBc3TKrcRM2DIu915qOjfkwGa+ jystYI2xC67YNqW9BxVyTNj1s9zhbWpi8Q6/Jnyb365VHa0rPWiwIhm/tda0G9fLEIoZ 3wo2VKW2XqnIcoUURHCk/kwVHsSq6aT8d57xC/JR+x5WWVt5iuguAyYrQpJs/YeoUIy2 5Nzc8jb06UhezkSwi5VBUZEo+Cc21ulNtZnR8CLslTIp61DInbW92hGn2MIE/8T6YVpr bHaA== 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=aigltwAw4OIwEArx+jLosQqqu01GixHEWWIeE336u1k=; b=FuS6YpvWVw3akz1KBoic89vNzuXVweU7TcOBb4UWFA3wUkNUzjaRiXwjvzSgapFCXf DlQIPyVyIK5XS0DyFPVxxFnpsnm3hVkj3o6lD+MrXOHZKO/xqE/QzWD93QXpZ25BpJOD coa/eHuHlDMx3qOGpgTcanxqV2M9v+mmuin396w/PUAfOTif/6x11kksG9KFYZ6qT1NY xIMtdmsgsWuSnm2kLnNIP3kIlwl58/w8YYbAM3mpeMicx/7uOOowhPzE29QZc6KJ79Xp NI3sYCengObDWySr2vh82owDorBMHvxu2Q5z3vZbs4uQ70JZE7WqopcDTZnCC2oru4V5 9asA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iHvc4Oiz; 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 5-20020a170906058500b006df76385e71si6881763ejn.785.2022.03.21.06.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 06:38:16 -0700 (PDT) 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=iHvc4Oiz; 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 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) 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-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-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 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 */