diff options
author | Sughosh Ganu | 2024-03-22 16:27:19 +0530 |
---|---|---|
committer | Tom Rini | 2024-05-24 13:40:03 -0600 |
commit | 1cafc2ab8d1e9da4d253442aa719895131c0901e (patch) | |
tree | 7423a80d2a98248f3206cb8f4c9868b525c589cf /include/fwu.h | |
parent | 48d9325303d97751e47c6f8abed2cd59a0edc2a6 (diff) |
fwu: metadata: add a version agnostic structure
The FWU specification now has two versions of the FWU metadata
structure, and both are to be supported. Introduce a version agnostic
structure for storing information about the FWU updatable images. This
allows for a split of common version agnostic FWU code and version
specific code.
The version specific code is then responsible for arranging the data
as per the corresponding metadata structure before it gets written to
the metadata partitions.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'include/fwu.h')
-rw-r--r-- | include/fwu.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/fwu.h b/include/fwu.h index 6c4d218e13a..e681e910274 100644 --- a/include/fwu.h +++ b/include/fwu.h @@ -8,6 +8,7 @@ #include <blk.h> #include <efi.h> +#include <fwu_mdata.h> #include <mtd.h> #include <uuid.h> @@ -35,6 +36,23 @@ struct fwu_mdata_mtd_priv { struct fwu_mtd_image_info *fwu_mtd_images; }; +struct fwu_data { + uint32_t crc32; + uint32_t version; + uint32_t active_index; + uint32_t previous_active_index; + uint32_t metadata_size; + uint32_t boot_index; + uint32_t num_banks; + uint32_t num_images; + uint8_t bank_state[4]; + bool trial_state; + + struct fwu_mdata *fwu_mdata; + + struct fwu_image_entry fwu_images[CONFIG_FWU_NUM_IMAGES_PER_BANK]; +}; + struct fwu_mdata_ops { /** * read_mdata() - Populate the asked FWU metadata copy |