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]>
---
Elliot Berman (3):
      x86: qemu: Describe pflash
      qemu-x86: Wire support for applying capsule updates to pflash
      x86: emulation: enable cfi flash drivers

 arch/x86/dts/pflash.dtsi               | 14 +++++++++++++
 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      |  6 ++++--
 board/emulation/common/qemu_mtdparts.c |  6 ++++--
 board/emulation/qemu-x86/Kconfig       |  3 +++
 board/emulation/qemu-x86/Makefile      |  3 +++
 board/emulation/qemu-x86/qemu-x86.c    | 38 ++++++++++++++++++++++++++++++++++
 configs/qemu-x86_64_defconfig          | 13 ++++++++++++
 configs/qemu-x86_defconfig             | 13 ++++++++++++
 11 files changed, 96 insertions(+), 4 deletions(-)
---
base-commit: ece349ade2973e220f524ce59e59711cc919263f
change-id: 20260729-qemu-x86-pflash-a41295da3cd1

Best regards,
--  
Elliot Berman <[email protected]>

Reply via email to