1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (c) 2022, Linaro Limited
6 #if !defined _FWU_MDATA_H_
9 #include <linux/compiler_attributes.h>
13 * struct fwu_image_bank_info - firmware image information
14 * @image_uuid: Guid value of the image in this bank
15 * @accepted: Acceptance status of the image
18 * The structure contains image specific fields which are
19 * used to identify the image and to specify the image's
22 struct fwu_image_bank_info
{
23 efi_guid_t image_uuid
;
29 * struct fwu_image_entry - information for a particular type of image
30 * @image_type_uuid: Guid value for identifying the image type
31 * @location_uuid: Guid of the storage volume where the image is located
32 * @img_bank_info: Array containing properties of images
34 * This structure contains information on various types of updatable
35 * firmware images. Each image type then contains an array of image
36 * information per bank.
38 struct fwu_image_entry
{
39 efi_guid_t image_type_uuid
;
40 efi_guid_t location_uuid
;
41 struct fwu_image_bank_info img_bank_info
[CONFIG_FWU_NUM_BANKS
];
45 * struct fwu_mdata - FWU metadata structure for multi-bank updates
46 * @crc32: crc32 value for the FWU metadata
47 * @version: FWU metadata version
48 * @active_index: Index of the bank currently used for booting images
49 * @previous_active_inde: Index of the bank used before the current bank
50 * being used for booting
51 * @img_entry: Array of information on various firmware images that can
54 * This structure is used to store all the needed information for performing
55 * multi bank updates on the platform. This contains info on the bank being
56 * used to boot along with the information needed for identification of
62 uint32_t active_index
;
63 uint32_t previous_active_index
;
65 struct fwu_image_entry img_entry
[CONFIG_FWU_NUM_IMAGES_PER_BANK
];
68 #endif /* _FWU_MDATA_H_ */