From patchwork Thu Mar 31 13:27:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 555285 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp641196mag; Thu, 31 Mar 2022 06:30:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo7bCel0s+jvIxCrUcmmQjk3BnP2sH1e1ILgp4VwSCnwnpvw4eGET3jzgsx0yXdO6eAGPu X-Received: by 2002:a50:fd94:0:b0:419:9ed:e870 with SMTP id o20-20020a50fd94000000b0041909ede870mr16741307edt.207.1648733453919; Thu, 31 Mar 2022 06:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648733453; cv=none; d=google.com; s=arc-20160816; b=SkiHInLgI0dVpkoU8mK8ompYFQ45ARWUPlm83vY/YGNDXybCwGw64H4gqpG1jbgLMV xawxuD89GhW5tWOsdwyOqEiiuEtUMpwCfbrlirY7lVH/Iwc2LaRo/6n4lzdQITcVCm1x xlJlUKVT4Ovx8uOqEQf83Dn1VOSFniSkJEYc8kXPiRf1Hbovjzoev+chJjsIFgu6I1Z1 0uKpU35EEHXXjqNDJkfAJn8XCGRznKo2FYXlnjpS8pW/j3YkILPik2HcAyqwWlHBPbFO wLmppS2fIV2Q42OhGnLSDC87NH97JgaFu/ci8BU+SFGpxBbR5LY/eqpx5/0rGwBuGCDm EslQ== 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=q1rtKDbaZJfXUiy00uJP+/2+BsAhBR1xm+WGsGXk2rE=; b=vKtjEIilY1tCxKu/SJ+qMnBKgKCwhMgsJj2/UehnWFI76A2HB9/ybsrjx9nl7uUF3I 7rxjjVVxgQlsPfOfCCfUNA3WXKLyc+s2UAIyMdhUmPfnzHXfQmfgOwZ9HcZrQM4Zkdtb Ggf0U5O0uLnpX11XqelVOI+PPWwsf+FQK/+e2cCt4Czqc1JqZ2DAKaXHtjHj9LTtllNT 6NmMNzkCG9JFQV8ca3VwPJ6wloJVGM1YyhVLbJA/4CmhBixy/cyD5EDUsHa0kG+c5foj qS3T/XV2uBXD63QE8bph8WaM7tQSCymuJPZV9PpRopb36y6T6KlAOVo2rnChWs9j/uGl 91AA== 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 oz24-20020a170906cd1800b006df76385e9asi22635390ejb.826.2022.03.31.06.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 06:30: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 91D778423A; Thu, 31 Mar 2022 15:29:58 +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 28D9B8423E; Thu, 31 Mar 2022 15:29:16 +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.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR autolearn=ham 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 AE5678421A for ; Thu, 31 Mar 2022 15:28:56 +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 30F5113D5; Thu, 31 Mar 2022 06:28:56 -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 724823F73B; Thu, 31 Mar 2022 06:28:52 -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 v4 8/8] doc: uefi: Update the capsule update related documentation Date: Thu, 31 Mar 2022 18:57:50 +0530 Message-Id: <20220331132750.1532722-9-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220331132750.1532722-1-sughosh.ganu@linaro.org> References: <20220331132750.1532722-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 Update the capsule update functionality related documentation to refect the additional definitions that need to be made per platform for supporting the capsule update feature. Signed-off-by: Sughosh Ganu --- Changes since V3: * Rephrase the commit message to indicate that the doc changes are not just limited to adding the GUID values, but other info as well. * Elaborate with an example on the relation between the dfu alt number and the image index doc/develop/uefi/uefi.rst | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index fe337c88bd..d886635cc3 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -312,8 +312,8 @@ Run the following command .. code-block:: console $ mkeficapsule \ - --index 1 --instance 0 \ - [--fit | --raw ] \ + --index --instance 0 \ + --guid \ Performing the update @@ -333,6 +333,26 @@ won't be taken over across the reboot. If this is the case, you can skip this feature check with the Kconfig option (CONFIG_EFI_IGNORE_OSINDICATIONS) set. +A few things need to be defined in the board file for performing the +capsule upadte. The first is defining the function set_dfu_alt_info in +the board file. This function sets the environment variable +dfu_alt_info. Instead of taking the variable from the environment, the +capsule update feature requires that the variable be set through the +board function, since that is more robust. Secondly, define GUID +values and image index of the images that are to be updated through +the capsule update feature in the board file. Both the values are to +be defined as part of the fw_images array. These GUID values would be +used by the Firmware Management Protocol(FMP) to populate the image +descriptor array and also displayed as part of the ESRT table. The +image index values defined in the array should be one greater than the +dfu alt number that corresponds to the firmware image. So, if the dfu +alt number for an image is 2, the value of image index in the +fw_images array for that image should be 3. The dfu alt number can be +obtained by running the following command:: + + dfu list + + Finally, the capsule update can be initiated by rebooting the board. Enabling Capsule Authentication