From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11A60C61DA4 for ; Sat, 4 Mar 2023 01:29:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9A39085D8E; Sat, 4 Mar 2023 02:29:00 +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="HrvsPOfP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BA37785D7C; Sat, 4 Mar 2023 02:28:58 +0100 (CET) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 2216785D8E for ; Sat, 4 Mar 2023 02:28:56 +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=takahiro.akashi@linaro.org Received: by mail-pl1-x62a.google.com with SMTP id i5so4637825pla.2 for ; Fri, 03 Mar 2023 17:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677893334; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=GReZ8GbGD6hC7KAudRwWzjsT3vD8GoX4vtRLqzKmMA8=; b=HrvsPOfPqNBtBaTVs6qUK5zzTa8P3mdwo1K9pIfOnyEWoS6oyUGMTFR7fgjfx42vx/ bsuPVvEmcCif3MLbQhHEEBE3XrYc8T5ta/BbzO9SlAASEK1excXGEc8GQAvudpZF+Gms SJE/g6exvssdDLBe+7Dq+/yLLc1NvVFjg+lRsFFo2IM2mIdA6IgJDL6x1O3yMFy1tLxW Z2ba3Mf7PUwCMjWizPs0KMS4gA6achuqkxDuJbdnFAZaNWJwoDgGY1iq4o3OcooRRfSm x25hwqjSbEgDwrgGWR1glbcFLN/j3Hnpk2Bk5ujJNFnWw1FD11lbDocRyzipAfboWE7b Gpng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677893334; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GReZ8GbGD6hC7KAudRwWzjsT3vD8GoX4vtRLqzKmMA8=; b=nGtVICyNgarzO0m33j8aG/PxGjKNHGYqm3WSQCXN9N0s9+VB4xcmn+2f0Nf97q6nwx 4oZ8iyjACQOdVEm8Ybr2ihTWrofqKe/YhYOdPJrixmv6bAFtovqNz1Uu25wuyteNMQko IGnWj1QStZ5QtuQLCJ8I43r08DfcjyvyDF7Vn0eiIMN+uI9ONhHhrrw7zX29JnoPa9KL ySkV/OOGfciNihSIS+UJIZ2cYRJGDGogQwfpI80T3NFZEcGpMeXdyRh/DDKYvSo0DHq0 aH21HMFj/YskslwoRD0Ksirv9JVebyWFr3aB2spFAkuyaskWt1xc4hLTaJb53Z4s5xvo 5x6w== X-Gm-Message-State: AO0yUKWV6eT+r4epRU7yv4rfPmHEMw31XsBaNIDCZd4N2b9Y1Xi5iiaV DtBm8mbnUwDHIoAQYsoSXbVlHw== X-Google-Smtp-Source: AK7set+MAGjmFNpJKVcI9P1c0ZVe61BDgTJLk0BSaqPmKsqoTjhly0aON6jt0AtQSAM1is440M4KTQ== X-Received: by 2002:a17:902:c40a:b0:19a:a815:2877 with SMTP id k10-20020a170902c40a00b0019aa8152877mr4254254plk.6.1677893334179; Fri, 03 Mar 2023 17:28:54 -0800 (PST) Received: from laputa ([2400:4050:c3e1:100:2b6c:54d0:525d:715b]) by smtp.gmail.com with ESMTPSA id kb8-20020a170903338800b00194d14d8e54sm2114616plb.96.2023.03.03.17.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 17:28:53 -0800 (PST) Date: Sat, 4 Mar 2023 10:28:50 +0900 From: Takahiro Akashi To: Masahisa Kojima Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Ilias Apalodimas Subject: Re: [PATCH v2 0/4] FMP versioning support Message-ID: <20230304012850.GA6747@laputa> Mail-Followup-To: Takahiro Akashi , Masahisa Kojima , u-boot@lists.denx.de, Heinrich Schuchardt , Ilias Apalodimas References: <20230301091523.18384-1-masahisa.kojima@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230301091523.18384-1-masahisa.kojima@linaro.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Kojima-san, On Wed, Mar 01, 2023 at 06:15:18PM +0900, Masahisa Kojima wrote: > Firmware version management is not implemented in the current > FMP implementation. This series aims to add the versioning support > in FMP. I think that you need to think of A/B update case, especially when a capsule update is *reverted* to an older version. In addition, please don't forget in the next patch set: - update the man page of mkeficapsule command - add test cases (in pytest) -Takahiro Akashi > EDK2 reference implementation utilizes the FMP Payload Header > inserted right before the capsule payload. With this series, > U-Boot also follows the EDK2 implementation. > > Currently, there is no way to know the current running firmware > version through the EFI interface. FMP->GetImageInfo() returns > always 0 for the version number. So a user can not know that > expected firmware is running after the capsule update. > > With this series applied, version number can be specified > in the capsule file generation with mkeficapsule tool, then > user can know the running firmware version through > FMP->GetImageInfo() and ESRT. > > Note that this series does not mandate the FMP Payload Header, > compatible with boards that are already using the existing > U-Boot FMP implementation. > If no FMP Payload Header is found in the capsule file, fw_version, > lowest supported version, last attempt version and last attempt > status is set to 0 and this is the same behavior as existing FMP > implementation. > > Changes in v2: > - add FMP Payload Header generation in mkeficapsule tool > > Masahisa Kojima (4): > efi_loader: store firmware version into FmpState variable > efi_loader: versioning support in GetImageInfo > efi_loader: check lowest supported version in capsule update > mkeficapsule: add FMP Payload Header > > lib/efi_loader/efi_firmware.c | 271 ++++++++++++++++++++++++++++++---- > tools/mkeficapsule.c | 81 +++++++++- > 2 files changed, 319 insertions(+), 33 deletions(-) > > -- > 2.17.1 >