U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Jonathan Humphreys <j-humphreys@ti.com>,
	Raymond Mao <raymond.mao@linaro.org>,
	Caleb Connolly <caleb.connolly@linaro.org>,
	Adriano Cordova <adrianox@gmail.com>,
	Udit Kumar <u-kumar1@ti.com>, Simon Glass <sjg@chromium.org>,
	Devarsh Thakkar <devarsht@ti.com>, Hari Nagalla <hnagalla@ti.com>,
	Manorit Chawdhry <m-chawdhry@ti.com>,
	Santhosh Kumar K <s-k6@ti.com>,
	Neha Malcom Francis <n-francis@ti.com>,
	Daniel Schultz <d.schultz@phytec.de>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Aashvij Shenai <a-shenai@ti.com>,
	Roger Quadros <rogerq@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Bryan Brattlof <bb@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Wadim Egorov <w.egorov@phytec.de>, Tom Rini <trini@konsulko.com>,
	Robert Nelson <robertcnelson@gmail.com>,
	Nishanth Menon <nm@ti.com>,
	Sughosh Ganu <sughosh.ganu@linaro.org>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	Lukasz Majewski <lukma@denx.de>,
	s-vadapalli@ti.com
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH v3 0/3] EFI Capsule update explicitly sets dfu_alt_info
Date: Mon, 17 Feb 2025 08:04:00 +0100	[thread overview]
Message-ID: <2eda2b4d-3b46-4871-9cb1-2fe0471eb2f4@amd.com> (raw)
In-Reply-To: <20250213195351.3518305-1-j-humphreys@ti.com>



On 2/13/25 20:53, Jonathan Humphreys wrote:
> For capsule update, explicitly set the dfu_alt_info environment variable
> before the DFU operation, and then restore it to the original value.
> Previously, the dfu_alt_info environment variable was set with the
> set_dfu_alt_info() function.
> 
> The problem with setting the capsule update's dfu_alt_info setting in
> set_dfu_alt_info() is that set_dfu_alt_info() lacks the context of what DFU
> operation is being performed (eg, capsule update, DFU boot, listing the
> alt_info, etc) so the capsule update setting was overwriting the setting
> for other DFU operations.
> 
> Changes from v1:
> - use log_err() instead of pr_err()
> - create a local copy of the original dfu_alt_info environment variable to
>    be used to later restore it, rather than just a pointer to the stored
>    value, because changing its value to the EFI capsule update setting will
>    cause the original string location to be freed.
> - even in the case of a DFU operation error, restore the dfu_alt_info
>    environment variable to its original value.
> - return EFI_EXIT based error codes if setting environment variables fails
> Link to v1: https://lore.kernel.org/r/20250203215351.2840144-1-j-humphreys@ti.com
> 
> Changes from v2:
> - add patch for xilinx boards to set the dfu_string member with the created
>    dfu_alt_info string for capsule updates
> Link to v2: https://lore.kernel.org/r/20250206154719.3032322-1-j-humphreys@ti.com
> 
> Jonathan Humphreys (2):
>    efi_firmware: set EFI capsule dfu_alt_info env explicitly
>    board: remove capsule update support in set_dfu_alt_info()
> 
> Michal Simek (1):
>    xilinx: dfu: Fill directly update_info.dfu_string
> 
>   board/beagle/beagleboneai64/beagleboneai64.c  |  8 ----
>   board/beagle/beagleplay/beagleplay.c          |  8 ----
>   .../aml-a311d-cc/aml-a311d-cc.c               |  2 -
>   .../aml-s805x-ac/aml-s805x-ac.c               |  2 -
>   .../aml-s905d3-cc/aml-s905d3-cc.c             |  2 -
>   board/phytec/common/k3/board.c                |  8 ----
>   board/ti/am62px/evm.c                         |  8 ----
>   board/ti/am62x/evm.c                          |  8 ----
>   board/ti/am64x/evm.c                          |  8 ----
>   board/ti/j721e/evm.c                          |  8 ----
>   board/ti/j784s4/evm.c                         |  8 ----
>   board/xilinx/common/board.h                   |  3 ++
>   board/xilinx/versal/board.c                   | 16 +++----
>   board/xilinx/zynq/board.c                     | 16 +++----
>   board/xilinx/zynqmp/zynqmp.c                  | 16 +++----
>   lib/efi_loader/Kconfig                        |  2 -
>   lib/efi_loader/efi_firmware.c                 | 44 +++++++++++++++----
>   17 files changed, 60 insertions(+), 107 deletions(-)
> 

Tested-by: Michal Simek <michal.simek@amd.com>

Thanks,
Michal


      parent reply	other threads:[~2025-02-17  7:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 19:53 [PATCH v3 0/3] EFI Capsule update explicitly sets dfu_alt_info Jonathan Humphreys
2025-02-13 19:53 ` [PATCH v3 1/3] xilinx: dfu: Fill directly update_info.dfu_string Jonathan Humphreys
2025-02-14 16:52   ` Mattijs Korpershoek
2025-02-18  7:43   ` Ilias Apalodimas
2025-02-13 19:53 ` [PATCH v3 2/3] efi_firmware: set EFI capsule dfu_alt_info env explicitly Jonathan Humphreys
2025-02-14 16:54   ` Mattijs Korpershoek
2025-02-18  7:54   ` Ilias Apalodimas
2025-02-24  2:38     ` Jon Humphreys
2025-02-26  8:54       ` Ilias Apalodimas
2025-02-13 19:53 ` [PATCH v3 3/3] board: remove capsule update support in set_dfu_alt_info() Jonathan Humphreys
2025-02-18  8:10   ` Ilias Apalodimas
2025-02-17  7:04 ` Michal Simek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2eda2b4d-3b46-4871-9cb1-2fe0471eb2f4@amd.com \
    --to=michal.simek@amd.com \
    --cc=a-shenai@ti.com \
    --cc=adrianox@gmail.com \
    --cc=bb@ti.com \
    --cc=caleb.connolly@linaro.org \
    --cc=d.schultz@phytec.de \
    --cc=devarsht@ti.com \
    --cc=hnagalla@ti.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=j-humphreys@ti.com \
    --cc=lukma@denx.de \
    --cc=m-chawdhry@ti.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=n-francis@ti.com \
    --cc=neil.armstrong@linaro.org \
    --cc=nm@ti.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=raymond.mao@linaro.org \
    --cc=robertcnelson@gmail.com \
    --cc=rogerq@kernel.org \
    --cc=s-k6@ti.com \
    --cc=s-vadapalli@ti.com \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.com \
    --cc=w.egorov@phytec.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox