summaryrefslogtreecommitdiff
path: root/drivers/fwu-mdata/gpt_blk.c
AgeCommit message (Collapse)Author
2024-05-24drivers: fwu: add the size parameter to the metadata access API'sSughosh Ganu
In version 2 of the metadata structure, the size of the structure cannot be determined statically at build time. The structure is now broken into the top level structure which contains a field indicating the total size of the structure. Add a size parameter to the metadata access API functions to indicate the number of bytes to be accessed. This is then used to either read the entire structure, or only the top level structure. Signed-off-by: Sughosh Ganu <[email protected]> Tested-by: Michal Simek <[email protected]>
2023-06-09fwu: meta-data: switch to management by common codeJassi Brar
The common code can now read, verify and fix meta-data copies while exposing one consistent structure to users. Only the .read_mdata() and .write_mdata() callbacks of fwu_mdata_ops are needed. Get rid of .get_mdata() .update_mdata() .get_mdata_part_num() .read_mdata_partition() and .write_mdata_partition() and also the corresponding wrapper functions. Signed-off-by: Jassi Brar <[email protected]> Reviewed-by: Etienne Carriere <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Tested-by: Sughosh Ganu <[email protected]>
2023-06-09fwu: gpt: implement read_mdata and write_mdata callbacksJassi Brar
Moving towards using common code for meta-data management, implement the read/write mdata hooks. Signed-off-by: Jassi Brar <[email protected]> Reviewed-by: Etienne Carriere <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Tested-by: Sughosh Ganu <[email protected]>
2023-06-09fwu: gpt: use cached meta-data partition numbersJassi Brar
Use cached values and avoid parsing and scanning through partitions everytime for meta-data partitions because they can't change after bootup. Acked-by: Etienne Carriere <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Jassi Brar <[email protected]> Tested-by: Sughosh Ganu <[email protected]>
2022-10-31FWU: Add FWU metadata access driver for GPT partitioned block devicesSughosh Ganu
In the FWU Multi Bank Update feature, the information about the updatable images is stored as part of the metadata, on a separate partition. Add a driver for reading from and writing to the metadata when the updatable images and the metadata are stored on a block device which is formatted with GPT based partition scheme. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>