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 33BF1C678D4 for ; Mon, 6 Mar 2023 06:32:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9143D85BD8; Mon, 6 Mar 2023 07:32:43 +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="m55vYuFM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A32A85BB5; Mon, 6 Mar 2023 07:32:40 +0100 (CET) Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (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 0768885BD7 for ; Mon, 6 Mar 2023 07:32:35 +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-pf1-x42b.google.com with SMTP id x7so3065869pff.7 for ; Sun, 05 Mar 2023 22:32:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678084354; 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=AnuEMTPWio7emObL0tCGAcoGLu8e2jLIzC1ExoZXeDs=; b=m55vYuFMErTVJfGV2K7xwti8os+i2IERJDCNfs5aw4K4RU9uKYxQXI0wVipw2DzsAb 96A7ELq4rDeHuxvv3HkHKizN485Ve/g5gUMWtt8XcejvR/KIthTN7wSipPbULBAGNa5D b4/uERACz+F/2ZlzLeQ/RIStUt1WW3W7oJ+onz+qy6cHuyKokN9zDp54ZZy21dJrDb/e flHOPaRnShysGMKPGuqCN8x6lzGl4yIuT75y5VRCuABidnyRXmxGbrNguRuNjMPhoWpO nSgr42O++dOEbFMLWtAkQX09QRbYiEErtLkxqr12vSRI8GYpuUbtKcW6ZYDr+39L5bIJ EARw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678084354; 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=AnuEMTPWio7emObL0tCGAcoGLu8e2jLIzC1ExoZXeDs=; b=4I1/rBoj4KvoXPBPxCHOY7B2ARrTsGyC7NNi5y3xsx7XUy2j6T9WUiqHblTyiMU8vf pEbye36BcxvLo2KWXHdKQn4lmfDWlBghdUgvLK892+62yeHcGRWGicLaQMf09bP5kSp+ 9HX0WBE0KBKEwthJeuO6YXHnlndkzFJr6LWi+aY/5iSVjXFO+edow/d8/Xv4d790L6nx XvT+lUEJbSPG4UavXVa/hGSzbEDeFUW5CJYg1fsrpu3Qe2CO14tGOqlG2UBdBY7d6fcA BwPl7TFPFq6hsfVEeoVjKkjUubSvqNUiCB50R6EnDUYWdrspv0wZD50DzpD53AhV84Yp YJlA== X-Gm-Message-State: AO0yUKUL6367VDoQvwNHbWB+SiRPG2QEmwyx3UXPHwE32N7aViBsdGty 8H4a7PoN9WTQgBCCGo5iAZ91HQ== X-Google-Smtp-Source: AK7set9i3+iT9nLZvPLVXgl0UuaE4AULdd6LHe7DssN6xqhRT1zgTlt1dhqYapAN7kByVjHjhMwIkw== X-Received: by 2002:a05:6a00:2a08:b0:5ef:8b7f:f69b with SMTP id ce8-20020a056a002a0800b005ef8b7ff69bmr10010121pfb.0.1678084354221; Sun, 05 Mar 2023 22:32:34 -0800 (PST) Received: from laputa ([2400:4050:c3e1:100:ece:f360:df04:6c09]) by smtp.gmail.com with ESMTPSA id x20-20020a62fb14000000b005d6fcd8f9desm5647495pfm.94.2023.03.05.22.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Mar 2023 22:32:33 -0800 (PST) Date: Mon, 6 Mar 2023 15:32:30 +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: <20230306063230.GA20882@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> <20230304012850.GA6747@laputa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon, Mar 06, 2023 at 03:08:55PM +0900, Masahisa Kojima wrote: > Hi Akashi-san, > > On Sat, 4 Mar 2023 at 10:28, Takahiro Akashi wrote: > > > > 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. > > A/B update(FWU) has their own version information in the Image Directory > defined in FWU spec[1], this is not implemented yet on U-Boot. > On second thought, I think A/B update(FWU) case should be excluded > from the version management introduced by this series. I don't think it's a good idea to have two different implementations for normal case and A/B update unless there is a good reason when we use the same FMP driver. -Takahiro Akashi > > > > In addition, please don't forget in the next patch set: > > - update the man page of mkeficapsule command > > - add test cases (in pytest) > > Yes, noted. > > [1] https://developer.arm.com/documentation/den0118/a/ > > Thanks, > Masahisa Kojima > > > > > -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 > > >