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 v3: - Fix build error for coreboot - Skip advertising mtdparts without a partition name - Add docs for QEMU Arm capsule updates, matching the new docs for x86 and the existing for risc-v - Docs and comments suggestions from Simon - Link to v2: https://patch.msgid.link/[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 To: [email protected] Cc: Simon Glass <[email protected]> Cc: Bin Meng <[email protected]> Cc: Tom Rini <[email protected]> Cc: Elliot Berman <[email protected]> Cc: Alexander Graf <[email protected]> Cc: Kuan-Wei Chiu <[email protected]> Cc: Jiaxun Yang <[email protected]> Cc: Max Filippov <[email protected]> Cc: Tuomas Tynkkynen <[email protected]> --- Elliot Berman (5): x86: qemu: Describe pflash x86: qemu: Wire support for applying EFI capsule updates to pflash x86: emulation: enable cfi flash drivers for DFU docs: emulation: Add qemu-x86 documentation for running as flash binary docs: emulation: Add qemu-arm documentation for running as flash binary arch/x86/dts/pflash.dtsi | 20 +++++++++++++++++ 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 | 39 +++++++++++++++++----------------- board/emulation/qemu-x86/Kconfig | 3 +++ board/emulation/qemu-x86/Makefile | 3 +++ board/emulation/qemu-x86/qemu-x86.c | 36 +++++++++++++++++++++++++++++++ configs/qemu-x86_64_defconfig | 11 ++++++++++ configs/qemu-x86_defconfig | 11 ++++++++++ doc/board/emulation/qemu-arm.rst | 32 ++++++++++++++++++++++++++++ doc/board/emulation/qemu-x86.rst | 39 ++++++++++++++++++++++++++++++++-- 13 files changed, 180 insertions(+), 34 deletions(-) --- base-commit: ece349ade2973e220f524ce59e59711cc919263f change-id: 20260729-qemu-x86-pflash-a41295da3cd1 Best regards, -- Elliot Berman <[email protected]>
