Merge tag 'fwu-next-19092024' of https://source.denx.de/u-boot/custodians/u-boot-tpm into next

This PR contains various improvements in the A/B update logic for EFI

- Read both copies of metadata, in case one of the is corrupted
- Check the metadata version against the running firmware to make sure it's
  allowed
- Limit the use of a revert capsule if the board is on a trial state and
  make sure it's not applied if the max counter has expired
This commit is contained in:
Tom Rini
2024-09-19 11:25:26 -06:00
6 changed files with 108 additions and 45 deletions

View File

@@ -417,4 +417,15 @@ int fwu_state_machine_updates(bool trial_state, uint32_t update_index);
*/
int fwu_init(void);
/**
* fwu_bank_accepted() - Has the bank been accepted
* @data: Version agnostic FWU metadata information
* @bank: Update bank to check
*
* Check in the given bank if all the images have been accepted.
*
* Return: true if all images accepted, false otherwise
*/
bool fwu_bank_accepted(struct fwu_data *data, uint32_t bank);
#endif /* _FWU_H_ */