[RFC PATCH 0/4] qemu: arm64: Add support for uefi firmware management protocol routines

Sughosh Ganu sughosh.ganu at linaro.org
Mon Mar 23 08:11:57 CET 2020


This series is based on the capsule update rfc series sent by Takahiro
Akashi[1].

These routines have been tested on the qemu arm64 platform for
updating the u-boot firmware through the capsule-on-disk functionality
of the uefi spec. A sub-command has been added under the 'efidebug
capsule' category of commands for initiating the firmware update.

The capsule file is placed on the efi system partition(esp), under the
EFI/UpdateCapsule directory. The BootNext and BootXXXX variables are
set accordingly by using the 'efidebug boot add' command.

The capsule update can then be initiated by the following command
'efidebug capsule disk-update'.

The feature can be enabled through the following config options
CONFIG_EFI_CAPSULE_UPDATE=y
CONFIG_EFI_CAPSULE_ON_DISK=y
CONFIG_EFI_CAPSULE_UPDATE_FIRMWARE=y
CONFIG_EFI_FIRMWARE_MANAGEMENT_PROTOCOL=y
CONFIG_CMD_EFIDEBUG=y

The GenerateCapsule.py script in edk2 has been used to generate the
capsule file.

Todo
* Capsule authentication support.
* Implement firmware version support.
* Invoke capsule update functionality during platform boot. This might
  be taken up by Takahiro.

[1] - https://lists.denx.de/pipermail/u-boot/2020-March/403038.html

Sughosh Ganu (4):
  efidebug: capsule: Add a command to update capsule on disk
  semihosting: Change semihosting file operation functions into global
    symbols
  semihosting: Add support for writing to a file
  qemu: arm64: Add support for efi firmware management protocol routines

 arch/arm/lib/semihosting.c              |  48 ++++++-
 board/emulation/qemu-arm/Kconfig        |  12 ++
 board/emulation/qemu-arm/Makefile       |   1 +
 board/emulation/qemu-arm/qemu_efi_fmp.c | 173 ++++++++++++++++++++++++
 cmd/efidebug.c                          |  14 ++
 include/semihosting.h                   |  14 ++
 6 files changed, 257 insertions(+), 5 deletions(-)
 create mode 100644 board/emulation/qemu-arm/qemu_efi_fmp.c
 create mode 100644 include/semihosting.h

-- 
2.17.1




More information about the U-Boot mailing list