[PATCH v2 0/4] qemu-x86: Wire up EFI capsule updates on pflash

Elliot Berman <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot.general,gmane.comp.boot-loaders.u-boot
Message-ID <[email protected]>
QEMU's x86 machines map a CFI NOR pflash device, mirroring the mechanism
qemu-arm64 already uses for capsule updates. This series describes that
pflash region in the x86 device trees and wires up the board code so
EFI capsule updates can target the u-boot partition on it.

Adding the pflash node to devicetree is safe even when QEMU is run
without -pflash. The same address range is backed by the BIOS ROM
instead, so the cfi-flash probe harmlessly reports no flash rather than
breaking existing -bios based boots.

Signed-off-by: Elliot Berman <[email protected]>
---
Changes in v2:
- Remove target conditionals around setting dfu_alt_info/mtdparts in
  qemu-common code
- Drop SYS_FLASH_USE_BUFFER_WRITE/SYS_FLASH_CFI from the defconfigs
- Docs and comments suggestions from Simon
- Link to v1: https://lists.u-boot-project.org/pipermail/u-boot/2026-July/626931.html

---
Elliot Berman (4):
      x86: qemu: Describe pflash
      x86: qemu: Wire support for applying EFI capsule updates to pflash
      x86: emulation: enable cfi flash drivers for DFU
      x86: Add qemu documentation for running as flash binary

 arch/x86/dts/pflash.dtsi               | 18 +++++++++++++++++
 arch/x86/dts/qemu-x86_i440fx.dts       |  1 +
 arch/x86/dts/qemu-x86_q35.dts          |  1 +
 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 ++++++++++++++++++++++++++++++++++
 configs/qemu-x86_64_defconfig          | 11 ++++++++++
 configs/qemu-x86_defconfig             | 11 ++++++++++
 doc/board/emulation/qemu-x86.rst       | 17 ++++++++++++++++
 12 files changed, 124 insertions(+), 32 deletions(-)
---
base-commit: ece349ade2973e220f524ce59e59711cc919263f
change-id: 20260729-qemu-x86-pflash-a41295da3cd1

Best regards,
--  
Elliot Berman <[email protected]>
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.