From patchwork Wed Jun 1 18:00:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 577791 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8f0c:0:0:0:0 with SMTP id mq12csp833375mab; Wed, 1 Jun 2022 11:01:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpGz3ndKU+5wmMcvFxmSEjacVKVoSGNNBbWeC3yOZH/pve70gAXLyHkkqPWSyOMH82MNsh X-Received: by 2002:a05:6e02:4a1:b0:2d3:a778:f0f1 with SMTP id e1-20020a056e0204a100b002d3a778f0f1mr827766ils.212.1654106470872; Wed, 01 Jun 2022 11:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654106470; cv=none; d=google.com; s=arc-20160816; b=fcU3LZ5s7JD2KUy6Wzu/Em2SS/Zuig8ImYDx2wkAs7s+nS0XrO8Tmvdsjk6J3LqDDU b5B6Nlv4KH/sNdXjH2CFMHpweUYcNx1ci3OxlpauAKDVao0guxZjuIjpNT3qzGKewL5a o8P9sgUGtmLFHU5l944hkA0cVWOI+7Qrd0irchligMnZXmWBTnJSRIMQHQ/2lZjtGxSE pXwGl5EpK+LYBgUid3JBcFXYLK5QEgRRLy+1HVXAZ6/qs47hagyN81z8bsKoS9FCavLL 2/kO0fQAHw+RssyYXVh/yI30iI9wOBU6VvicXPt4diD5mV3IKwluwkyd8SSJ2yXCTMpw xExQ== 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:message-id:date:subject:cc:to:from; bh=1RgwNlFyWtRIGWpzfsFE3mAT7NISy3ucCwJmyZ5qgF8=; b=wH6BldckkNAo9QtIzbG5aZ7Fcax9Q0o0PIuWwHZewSQVCQ6DD1R+tBonf0oVZa7wAt o/KZrlIOgAcWbyayMS/2whYqikakaosebklrAbPeWGWRSem+5r8nlZok66J6Rl0rneDT 08ls3RXfGLNAAP7rIvCMYeoOGiOdeFfZGQ6UBXfIBHnRBhbITSg0kxHqyils+BHsqNuq gHZEeNIOoai82y286ocMV650Y7JHuJwNlBYlxjIIC52B71E9To7n6lDZBQBkns8VZK04 iX1GyKvK1xn072kJaroX862XPk7REuLXzkliA7oPeqE7qnnFZY2gJBBCXC2gEtqXNNiU 9yuA== 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 u9-20020a056638304900b0032421f3fee4si2969186jak.126.2022.06.01.11.01.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 11:01:10 -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 15559842E6; Wed, 1 Jun 2022 20:01:06 +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 CF2A0842DE; Wed, 1 Jun 2022 20:01:03 +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 D713283E80 for ; Wed, 1 Jun 2022 20:01:00 +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 2C2C7D6E; Wed, 1 Jun 2022 11:01:00 -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 AACD93F766; Wed, 1 Jun 2022 11:00:58 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Takahiro Akashi Subject: [PATCH v2 0/4] EFI: Miscellaneous capsule update fixes Date: Wed, 1 Jun 2022 23:30:37 +0530 Message-Id: <20220601180041.340240-1-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.25.1 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 following set of patches fix separate issues relating to the capsule update code. The first patch moves the setting of the descriptor_count parameter to the GetImageInfo function after assertion of a non zero image descriptor buffer. The second patch enables capsule update to proceed even when the OsIndications variable is not set with EFI_IGNORE_OSINDICATIONS config enabled. The third patch updates the capsule update documentation to highlight the 64 bit value of OsIndications that needs to be set. The fourth patch defines a common function for the GetImageInfo functionality for both FIT and raw image FMP instances. Sughosh Ganu (4): EFI: Populate descriptor_count value only when image_info_size is not zero EFI: Do not consider OsIndications variable if CONFIG_EFI_IGNORE_OSINDICATIONS is enabled EFI: Update the documentation to reflect the correct value of OsIndications EFI: FMP: Use a common GetImageInfo function for FIT and raw images doc/develop/uefi/uefi.rst | 2 +- lib/efi_loader/efi_capsule.c | 7 +-- lib/efi_loader/efi_firmware.c | 85 +++++++---------------------------- 3 files changed, 21 insertions(+), 73 deletions(-)