ESRT table incomplete if one FMP protocol fails
Function efi_esrt_populate() is used to populate the ESRT table.
If one of the FMP protocols malfunctions when calling GetImageInfo(), e.g because the dfu environment variables are not set, we should still add all other FMP protocols to the ESRT table, e.g the one added in the ESRT unit test.
The sequence of operation in efi_esrt_populate() should be changed:
-
get the number of FMP protocols from LocateHandleBuffer
-
initialize ESRT table
a. allocate an ESRT that is big enough
b. set FwResourceCountMax.
-
iterate over the FMP protocols, for each valid FMP protocol:
a. increase FwResourceCount
b. add the info block.