mirror of https://github.com/acidanthera/audk.git
e314132fea
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1525 The patch is to merge multiple FMP instances into single ESRT entry when they have the same GUID. The policy to LastAttemptStatus/LastAttemptVersion of ESRT entry is: If all the LastAttemptStatus are LAST_ATTEMPT_STATUS_SUCCESS, then LastAttemptVersion should be the smallest of LastAttemptVersion. If any of the LastAttemptStatus is not LAST_ATTEMPT_STATUS_SUCCESS, then the LastAttemptVersion/LastAttemptStatus should be the values of the first FMP instance whose LastAttemptStatus is not LAST_ATTEMPT_STATUS_SUCCESS. To detect possible duplicated GUID/HardwareInstance, a table of GUID/HardwareInstance pairs from all the EFI_FIRMWARE_IMAGE_DESCRIPTORs from all FMP instances is built. If a duplicate is found, then generate a DEBUG_ERROR message, generate an ASSERT(), and ignore the duplicate EFI_FIRMWARE_IMAGE_DESCRIPTOR. Add an internal worker function called FmpGetFirmwareImageDescriptor() that retrieves the list of EFI_FIRMWARE_IMAGE_DESCRIPTORs from a single FMP instance and returns the descriptors in an allocated buffer. This function is used to get the descriptors used to build the table of unique GUID/HardwareInstance pairs. It is then used again to generate the ESRT Table from all the EFI_FIRMWARE_IMAGE_DESCRIPTORs from all the FMP instances. 2 passes are performed so the total number of descriptors is known. This allows the correct sized buffers to always be allocated. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Eric Jin <eric.jin@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> |
||
---|---|---|
.. | ||
Acpi | ||
BdsDxe | ||
BootManagerPolicyDxe | ||
CapsuleOnDiskLoadPei | ||
CapsulePei | ||
CapsuleRuntimeDxe | ||
Console | ||
DebugPortDxe | ||
DebugServicePei | ||
DebugSupportDxe | ||
DevicePathDxe | ||
Disk | ||
DisplayEngineDxe | ||
DriverHealthManagerDxe | ||
DriverSampleDxe | ||
EbcDxe | ||
EsrtDxe | ||
EsrtFmpDxe | ||
FaultTolerantWriteDxe | ||
FaultTolerantWritePei | ||
FileExplorerDxe | ||
FvSimpleFileSystemDxe | ||
HiiDatabaseDxe | ||
HiiResourcesSampleDxe | ||
LegacyRegion2Dxe | ||
LoadFileOnFv2 | ||
LockBox/SmmLockBox | ||
MemoryTest | ||
Metronome | ||
MonotonicCounterRuntimeDxe | ||
PCD | ||
PcatSingleSegmentPciCfg2Pei | ||
PlatformDriOverrideDxe | ||
PrintDxe | ||
RegularExpressionDxe | ||
ReportStatusCodeRouter | ||
ResetSystemPei | ||
ResetSystemRuntimeDxe | ||
SectionExtractionDxe | ||
SectionExtractionPei | ||
SecurityStubDxe | ||
SerialDxe | ||
SetupBrowserDxe | ||
SmbiosDxe | ||
SmbiosMeasurementDxe | ||
SmmCommunicationBufferDxe | ||
StatusCodeHandler | ||
TimestampDxe | ||
Variable | ||
WatchdogTimerDxe |