Re: [PATCH v14 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-19 Thread Ilias Apalodimas
Hi Sughosh, Etienne [...] > > > + * Check if the platform has defined its own > > > + * function to check the metadata partitions' > > > + * validity. If so, that takes precedence. > > > + */ > > > + ret = fwu_mdata_check(dev); > > > > Isn't this a bit dangerous? Let's sa

Re: [PATCH v14 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-19 Thread Sughosh Ganu
hi Ilias, On Thu, 20 Oct 2022 at 01:26, Ilias Apalodimas wrote: > > Hi Sughosh > > > [...] > > > + * > > + * Read both the metadata copies from the storage media, verify their > > checksum, > > + * and ascertain that both copies match. If one of the copies has gone bad, > > + * restore it from t

Re: [PATCH v14 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-19 Thread Etienne Carriere
Hi Sughosh, Ilias, On Wed, 19 Oct 2022 at 21:56, Ilias Apalodimas wrote: > > Hi Sughosh > > > [...] > > > + * > > + * Read both the metadata copies from the storage media, verify their > > checksum, > > + * and ascertain that both copies match. If one of the copies has gone bad, > > + * restore

Re: [PATCH v14 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-19 Thread Ilias Apalodimas
Hi Sughosh [...] > + * > + * Read both the metadata copies from the storage media, verify their > checksum, > + * and ascertain that both copies match. If one of the copies has gone bad, > + * restore it from the good copy. > + * > + * Return: 0 if OK, -ve on error > + * > + */ > +int fwu_check

[PATCH v14 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-18 Thread Sughosh Ganu
In the FWU Multi Bank Update feature, the information about the updatable images is stored as part of the metadata, which is stored on a dedicated partition. Add the metadata structure, and a driver model uclass which provides functions to access the metadata. These are generic API's, and implement