Lines Matching defs:metadata
20 * It avoids accessing data outside of the metadata structure during
27 static struct fwu_metadata metadata;
31 * Compute CRC32 of the FWU metadata, and check it against the CRC32 value
32 * present in the FWU metadata.
38 unsigned char *data = (unsigned char *)&metadata;
40 uint32_t calc_crc = tf_crc32(0U, data + sizeof(metadata.crc_32),
41 (sizeof(metadata) -
42 sizeof(metadata.crc_32)));
44 if (metadata.crc_32 != calc_crc) {
52 * Check the sanity of FWU metadata.
59 if ((metadata.active_index >= NR_OF_FW_BANKS) ||
60 (metadata.previous_active_index >= NR_OF_FW_BANKS)) {
68 * Verify and load specified FWU metadata image to local FWU metadata structure.
70 * @image_id: FWU metadata image id (either FWU_METADATA_IMAGE_ID or
100 result = io_read(image_handle, (uintptr_t)&metadata,
119 WARN("Sanity %s\n", "check failed on FWU metadata");
126 WARN("CRC %s\n", "check failed on FWU metadata");
148 struct fwu_image_entry *entry = &metadata.img_entry[i];
150 &entry->img_props[metadata.active_index];
164 return &metadata;
168 * Load verified copy of FWU metadata image kept in the platform NV storage
169 * into local FWU metadata structure.
175 /* Load FWU metadata which will be used to load the images in the
193 plat_fwu_set_images_source(&metadata);