From patchwork Wed Mar 30 14:50:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 555114 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1315117mag; Wed, 30 Mar 2022 07:52:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztrR5fKrbR+lYtvZXbbfiXa5nL6VMvX067pSY7sy/oDbr9RfhZEAeCtg1nIf7+qng+LLBd X-Received: by 2002:a17:906:1e94:b0:6b9:6fcc:53fd with SMTP id e20-20020a1709061e9400b006b96fcc53fdmr41048181ejj.450.1648651973661; Wed, 30 Mar 2022 07:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648651973; cv=none; d=google.com; s=arc-20160816; b=tzAGKXPX4x6gNMAR+Zlf3qHmbXJBv/jIx48IcBGt5f23d7jWbPBsP9EsWhbWSzQfzj 7Rf44QtufLmDm3S6tzlSpC3uepcuL4v1sKJb32ifHutFM5sisPJHBTJ/dLis40QzBGEu moWRJGB4f++BiYnl5lg9Q5ZFLkBSYTxSTog9Hc0xPFzM28jFl8/GjQHLIifphgXZb+1F d4xA7g1tBF+wspmi2fQKIyoKwGjvahCX0niXQ4ilgew7tgHrm7KQy81SL9zqJPVjPWeU NTyG7J/sRdLt0abvxlRU9pSGlCrbdbDvc7I1ma8rhYe0ARBFfjeMm5k/yXV9JVlwLH6Q uZTg== 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:references:in-reply-to:message-id:date:subject:cc:to :from; bh=86UURNInBWh1AL6SsarKh+CXb+eRKiDcOGdSPu5S9HM=; b=ddOqXOBakoWcb2aFTpDG0Yw4hgm7R9HfaEfQYuTZKgfW4ZkKZo1y/v9bl4izwjSgvH ozv9TuN4HJP5Axi3rSBnDinM2OGUvhNwOOHYmdsckJMEkPJ0MAlynWfaN4a75Z/Cfqjx Zy1RI9R/YC0UEVoT7OTWhrsLFf/ShW+eDeT3cNwbwg+09Wc310Tv1UFJlxD4zTSCxWFn ywuN/iqUhFQ5iwFi5bs2GqtYvY1rpi7M94wsmOCAzmveKNpNwmEes+GIOHSBEH2vqbRu w/RevdW5opIdWsy9CYkpKjjNSGt6FdONiZxNhasugwZp2spr43Ikmo0ldRlEDfOO5nWH po4Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 x26-20020a50d61a000000b00418f53ed459si21826624edi.192.2022.03.30.07.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 07:52:53 -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; 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=fail (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 0FFC184112; Wed, 30 Mar 2022 16:52:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id A0C5284130; Wed, 30 Mar 2022 16:52:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 37AA784101 for ; Wed, 30 Mar 2022 16:51:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 701B523A; Wed, 30 Mar 2022 07:51:57 -0700 (PDT) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8EC933F73B; Wed, 30 Mar 2022 07:51:53 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , AKASHI Takahiro , Ying-Chun Liu , Tuomas Tynkkynen , Heiko Thiery , Frieder Schrempf , Michael Walle , Masami Hiramatsu , Jassi Brar , Michal Simek , Michal Simek , Sughosh Ganu Subject: [PATCH v3 5/9] capsule: kconfig: Select SET_DFU_ALT_INFO config symbol for capsule update Date: Wed, 30 Mar 2022 20:20:59 +0530 Message-Id: <20220330145103.1435736-6-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220330145103.1435736-1-sughosh.ganu@linaro.org> References: <20220330145103.1435736-1-sughosh.ganu@linaro.org> 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 The capsule update code uses the dfu_alt_info variable for the actual update of the firmware component. The dfu_alt_info variable gives information needed to perform the update, like the device on which the update is to be made, the partition, type of partition etc. Since the dfu_alt_info is a environmental variable, it can be modified from the u-boot command line. An incorrect update of the variable will result in the update being done incorrectly. Prevent this scenario by forcing an update of the dfu_alt_info variable from the information obtained through the board file when UEFI capsule update functionality is enabled. Signed-off-by: Sughosh Ganu --- Changes since V2: New Patch lib/efi_loader/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index e5e35fe51f..09fb8cbe75 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -174,6 +174,7 @@ config EFI_CAPSULE_FIRMWARE_FIT depends on EFI_CAPSULE_FIRMWARE_MANAGEMENT select UPDATE_FIT select DFU + select SET_DFU_ALT_INFO select EFI_CAPSULE_FIRMWARE help Select this option if you want to enable firmware management protocol @@ -185,6 +186,7 @@ config EFI_CAPSULE_FIRMWARE_RAW depends on SANDBOX || (!SANDBOX && !EFI_CAPSULE_FIRMWARE_FIT) select DFU_WRITE_ALT select DFU + select SET_DFU_ALT_INFO select EFI_CAPSULE_FIRMWARE help Select this option if you want to enable firmware management protocol