From patchwork Thu Apr 30 17:36:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 239025 List-Id: U-Boot discussion From: sughosh.ganu at linaro.org (Sughosh Ganu) Date: Thu, 30 Apr 2020 23:06:22 +0530 Subject: [PATCH 0/8] qemu: arm64: Add support for uefi firmware management protocol routines Message-ID: <20200430173630.15608-1-sughosh.ganu@linaro.org> This series is based on the capsule update 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. This series supports updating the u-boot binary image on platforms booting from arm trusted firmware(tf-a), where the u-boot image gets booted as the BL33 payload. Support has also been added for authenticating the capsule file using the public key contained in the root certificate stored as an efi variable. 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. More details added as part of the documentation patch. [1] - https://lists.denx.de/pipermail/u-boot/2020-April/408760.html Sughosh Ganu (8): 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 efi_loader: Allow parsing of miscellaneous signature database variables efi_loader: Make the pkcs7 header parsing function an extern efi: capsule: Add support for uefi capsule authentication qemu: arm64: Add support for uefi capsule authentication qemu: arm64: Add documentation for capsule update 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 | 243 ++++++++++++++++++++++++ doc/board/emulation/qemu-arm.rst | 112 +++++++++++ include/efi_api.h | 17 ++ include/efi_loader.h | 13 +- include/semihosting.h | 14 ++ lib/efi_loader/Kconfig | 16 ++ lib/efi_loader/efi_capsule.c | 126 ++++++++++++ lib/efi_loader/efi_image_loader.c | 11 +- lib/efi_loader/efi_signature.c | 96 ++++++++-- lib/efi_loader/efi_variable.c | 91 +-------- 13 files changed, 692 insertions(+), 108 deletions(-) create mode 100644 board/emulation/qemu-arm/qemu_efi_fmp.c create mode 100644 include/semihosting.h