Re: [PATCH v2 2/4] x86: qemu: Wire support for applying EFI capsule updates to pflash

Simon Glass <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot.general,gmane.comp.boot-loaders.u-boot
Message-ID <CAFLszTiW0cFyRkeLRAw9k3sP_TpPqO-Qu1PvH+fmi67qOmVK8Q@mail.gmail.com>
Hi Elliot,

On 2026-08-07T18:07:09, Elliot Berman <[email protected]> wrote:
> x86: qemu: Wire support for applying EFI capsule updates to pflash
>
> Add new UUIDs for QEMU x86/x86-64 EFI capsules and register them with
> update_info. Enable the config options to bind the pflash with dfu,
> expecting to follow the typical convention of the first bank (nor0)
> containing u-boot.
>
> Signed-off-by: Elliot Berman <[email protected]>
>
> board/emulation/common/Kconfig         |  2 ++
>  board/emulation/common/qemu_dfu.c      | 16 ++++-----------
>  board/emulation/common/qemu_mtdparts.c | 36 +++++++++++++++------------------
>  board/emulation/qemu-x86/Kconfig       |  3 +++
>  board/emulation/qemu-x86/Makefile      |  3 +++
>  board/emulation/qemu-x86/qemu-x86.c    | 37 ++++++++++++++++++++++++++++++++++
>  6 files changed, 65 insertions(+), 32 deletions(-)

> diff --git a/board/emulation/common/qemu_mtdparts.c b/board/emulation/common/qemu_mtdparts.c
> @@ -50,28 +50,24 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
> -     /* Currently mtdparts is needed on Qemu ARM64 for capsule updates */
> -     if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT) &&
> -         IS_ENABLED(CONFIG_TARGET_QEMU_ARM_64BIT)) {

Just to check the knock-on effect of dropping the target check:
qemu-arm-sbsa also builds this file (it implies SYS_MTDPARTS_RUNTIME
and sources the common Kconfig), so it now looks for nor0 too, and
MTDPARTS_NOR0 has no default there so it resolves to an empty string.
I suspect this is harmless today, since sbsa does not enable
FLASH_CFI_MTD so no nor0 MTD device is registered, but if that changes
the result would be a malformed 'mtdparts=nor0:' - perhaps
board_get_mtdparts() should skip a device whose partition string is
empty. Fine as a follow-up if you agree it is latent.

Reviewed-by: Simon Glass <[email protected]>

Regards,
Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.