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 1F50FEB64DC for ; Thu, 20 Jul 2023 05:49:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D46848679B; Thu, 20 Jul 2023 07:49:18 +0200 (CEST) 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="x3g9roMv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E6B8867B6; Thu, 20 Jul 2023 07:49:17 +0200 (CEST) Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) (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 D8999867B3 for ; Thu, 20 Jul 2023 07:49:14 +0200 (CEST) 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-x629.google.com with SMTP id d9443c01a7336-1b8c364ad3bso691125ad.1 for ; Wed, 19 Jul 2023 22:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689832153; x=1690436953; 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=PpJy07bI/wa6FgtvUM9pEm/Zfug2/JjtkLFXG127xTc=; b=x3g9roMvAmXGjG1fIJc76dujp4topUaMFwXiDFwHSOvofUjZuuFWY294mdPlriMKS3 kilCg0i+hJpur6FsnpTrnTk/KR0RmbVpxHA+Vm1q0o77Rla+anDFFeiRAukUbrWdLTI8 20XKkRzx2rC7Fv6ffixc4fGMlEa5ATK826BJ+wqHfQ2yn8Hbp9vUIVm52LQDe7vlFzSN LWJDZxX6ZpngsTqgYUdTTozr59uRAiCXHKXJkwxJ8wzqjEaGvTF9/vmMsKGgwdvTYoKg 6JUF7tZAmL3qq101+AStbB8H0FVehPLSJpA54G2HIQM0z16VHjt5NNLXc5+qKGVqTmlP oJ+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689832153; x=1690436953; 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=PpJy07bI/wa6FgtvUM9pEm/Zfug2/JjtkLFXG127xTc=; b=cFwht4/F5jPzYjmbLKmYlyDwfHqQOxRH4FPfJ4YuZQGF8A8oLCx+qZO7Z9MVIWKb+i wfn6sA39Daw3fQF2icWmmSM5PTMOQtbup36S1S+cC92JsC8QpLVvX4iH1Zo+//Um7AvO +btdQMrXDB4v0Us36HDMyz2/ipm4z0zPTFJgP2fZWOHDOlkse+2+ikTKl9xHYu3nWy3y wi2OBDa6gMro6GAPdyDXIsaOxzvVcLzh4NoJ2Pjb7oiMVLK/zxzFTA3n9/jlbR7BQUKO nwZpLTzeONzWE2qIXiXrTK1np2AEaR1NljMLr2+kqqJ+j5T8BDFeCrsO+F3jRl6UWhlg 0zXQ== X-Gm-Message-State: ABy/qLaHTijEModJ9kLjuRIUJRJVlsAxYLmZjpFjA3zhF/lb9w3BRxKL jEzkKwcAwxPMuWveYC/tS6QJPg== X-Google-Smtp-Source: APBJJlGeWYmF989WoDH+984Sm/OFwX6mqiiAaT/RgU+NDMrAZvciXHLQTyqlpQSUa1UJ98TEAXmJSA== X-Received: by 2002:a17:902:ecd2:b0:1b8:b4f6:1327 with SMTP id a18-20020a170902ecd200b001b8b4f61327mr2243438plh.6.1689832153145; Wed, 19 Jul 2023 22:49:13 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:b19f:5d18:5b09:a6df]) by smtp.gmail.com with ESMTPSA id n10-20020a170902e54a00b001bb34ae3f47sm283902plf.122.2023.07.19.22.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 22:49:12 -0700 (PDT) Date: Thu, 20 Jul 2023 14:49:09 +0900 From: AKASHI Takahiro To: Michal Simek Cc: sughosh.ganu@linaro.org, Heinrich Schuchardt , Ilias Apalodimas , u-boot@lists.denx.de, git@xilinx.com Subject: Re: [PATCH] efi_loader: Allow also empty capsule to be process Message-ID: Mail-Followup-To: AKASHI Takahiro , Michal Simek , sughosh.ganu@linaro.org, Heinrich Schuchardt , Ilias Apalodimas , u-boot@lists.denx.de, git@xilinx.com References: <9f2b578b-9e10-bf3a-2ce5-229f64b37fd3@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f2b578b-9e10-bf3a-2ce5-229f64b37fd3@amd.com> 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.8 at phobos.denx.de X-Virus-Status: Clean Hi, On Wed, Jul 19, 2023 at 08:28:41AM +0200, Michal Simek wrote: > > > On 7/18/23 17:41, Heinrich Schuchardt wrote: > > On 13.07.23 16:35, Michal Simek wrote: > > > Empty capsule are also allowed to be process. Without it updated images > > > can't change their Image Acceptance state from no to yes. > > > > Is there any documentation describing the usage of empty capsule to set > > the image acceptance state? > > I actually don't know about documentation. I was talking to Ilias to make > sure that documentation is up2date because there are missing couple of > things there. Sughosh should have more to say here about A/B update. > I am testing A/B update and if you setup oemflags to 0x8000 then capsules > are not automatically accepted and waiting for acceptance capsule to be > passed. > When I tested it I found out that they are not process that's why I created > this patch. The path you tried to modify is only executed by "efidebug capsule update" or more specifically via the runtime service, UPDATE_CAPSULE. But this API is NOT officially supported in the current capsule implementation (at least, in my initial intention). The only way to invoke capsule updates is to reboot the system. If you want to test A/B update, please do the reboot. -Takahiro Akashi > But definitely someone should check that logic that the patch is > right based on intention how these empty capsules should be used. > I am actually not quite sure how revert capsules should be used and how to > revert only certain image if you use multiple images in the same bank. > > Thanks, > Michal