diff options
author | Sughosh Ganu <sughosh.ganu@linaro.org> | 2022-04-15 11:29:34 +0530 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-15 10:43:18 +0200 |
commit | 741ef867288bb294039e34ab2287ffe981b05b86 (patch) | |
tree | 283cab5cd74fea8b86672de3dc3fdb674117dd17 /board/emulation/qemu-arm/qemu-arm.c | |
parent | 42a2d90cf51acea56bf19006ed5688c93c099ff0 (diff) |
capsule: board: Add information needed for capsule updates
Add a structure which defines the information that is needed for
executing capsule updates on a platform. Some information in the
structure like the dfu string is used for making the update process
more robust while some information like the per platform image GUIDs
is used for fixing issues. Initialise this structure in the board
file, and use the information for the capsule updates.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Diffstat (limited to 'board/emulation/qemu-arm/qemu-arm.c')
-rw-r--r-- | board/emulation/qemu-arm/qemu-arm.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index c9e886e44a5..16237e29e46 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -6,15 +6,43 @@ #include <common.h> #include <cpu_func.h> #include <dm.h> +#include <efi.h> +#include <efi_loader.h> #include <fdtdec.h> #include <init.h> #include <log.h> #include <virtio_types.h> #include <virtio.h> +#include <linux/kernel.h> + #ifdef CONFIG_ARM64 #include <asm/armv8/mmu.h> +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) +struct efi_fw_image fw_images[] = { +#if defined(CONFIG_TARGET_QEMU_ARM_32BIT) + { + .image_type_id = QEMU_ARM_UBOOT_IMAGE_GUID, + .fw_name = u"Qemu-Arm-UBOOT", + .image_index = 1, + }, +#elif defined(CONFIG_TARGET_QEMU_ARM_64BIT) + { + .image_type_id = QEMU_ARM64_UBOOT_IMAGE_GUID, + .fw_name = u"Qemu-Arm-UBOOT", + .image_index = 1, + }, +#endif +}; + +struct efi_capsule_update_info update_info = { + .images = fw_images, +}; + +u8 num_image_type_guids = ARRAY_SIZE(fw_images); +#endif /* EFI_HAVE_CAPSULE_SUPPORT */ + static struct mm_region qemu_arm64_mem_map[] = { { /* Flash */ |