summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDario Binacchi <[email protected]>2026-04-30 10:06:07 +0200
committerPatrice Chotard <[email protected]>2026-05-12 15:52:01 +0200
commit97cdde6dfad31341d5efc9a8030b90049577ab90 (patch)
tree4c5e0f480d24fcf23c61aba1d0aca4573a451d54 /include
parent2dc71c48bf14aa22f24824dcd94550cc5277f402 (diff)
fwu: add helper to get image GUID by type and bank index
Introduce fwu_mdata_get_image_guid() to retrieve a specific image GUID from the FWU metadata based on the bank index and image type GUID. This allows identifying the correct partition in multi-bank (A/B) scenarios, ensuring the correct image is targeted depending on the current bank. Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/fwu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/fwu.h b/include/fwu.h
index 9cee8fb085c..68a51fb4296 100644
--- a/include/fwu.h
+++ b/include/fwu.h
@@ -397,6 +397,17 @@ void fwu_populate_mdata_image_info(struct fwu_data *data);
int fwu_get_mdata_size(uint32_t *mdata_size);
/**
+ * fwu_mdata_get_image_guid() - Get image GUID for a type and bank
+ * @image_guid: Pointer to be filled with the found image GUID
+ * @image_type_guid: Pointer to the image type GUID to search for
+ * @bank_index: Index of the bank
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int fwu_mdata_get_image_guid(efi_guid_t *image_guid,
+ const efi_guid_t *image_type_guid, u32 bank_index);
+
+/**
* fwu_state_machine_updates() - Update FWU state of the platform
* @state: FWU bank state
* @update_index: Bank number to which images have been updated