audk/MdeModulePkg/Universal
Jin, Eric e314132fea MdeModulePkg/EsrtFmpDxe: Enhance ESRT to support multiple controllers
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>
2019-08-07 13:18:32 +08:00
..
Acpi MdeModulePkg/FirmwarePerformanceDxe: make global variable static 2019-04-28 10:54:27 +08:00
BdsDxe MdeModulePkg/BdsDxe: Use a pcd to control PlatformRecovery 2019-07-01 14:59:20 +08:00
BootManagerPolicyDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
CapsuleOnDiskLoadPei MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM. 2019-06-26 15:10:42 +08:00
CapsulePei MdeModulePkg/CapsulePei: Add memory pointer check 2019-06-26 16:08:48 +08:00
CapsuleRuntimeDxe MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature. 2019-06-26 15:10:41 +08:00
Console MdeModulePkg/GraphicsConsoleDxe: Initialize the output mode 2019-06-13 14:53:40 +08:00
DebugPortDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DebugServicePei MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DebugSupportDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DevicePathDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Disk MdeModulePkg: Remove BootInRecoveryMode PPI 2019-05-09 20:52:41 +08:00
DisplayEngineDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DriverHealthManagerDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DriverSampleDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
EbcDxe MdeModulePkg/EbcDxe: implement the PE/COFF emulator protocol 2019-04-14 18:37:33 -07:00
EsrtDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
EsrtFmpDxe MdeModulePkg/EsrtFmpDxe: Enhance ESRT to support multiple controllers 2019-08-07 13:18:32 +08:00
FaultTolerantWriteDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
FaultTolerantWritePei MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
FileExplorerDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
FvSimpleFileSystemDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
HiiDatabaseDxe MdeModulePkg/HiiDB: Minimize memory allocation times after ReadyToBoot 2019-04-28 09:32:42 +08:00
HiiResourcesSampleDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
LegacyRegion2Dxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
LoadFileOnFv2 MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
LockBox/SmmLockBox MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
MemoryTest MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Metronome MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
MonotonicCounterRuntimeDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PCD MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PcatSingleSegmentPciCfg2Pei MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PlatformDriOverrideDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PrintDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RegularExpressionDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
ReportStatusCodeRouter MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
ResetSystemPei MdeModulePkg/ResetSystemPei: Change comments of ResetSystem2 2019-04-28 09:40:15 +08:00
ResetSystemRuntimeDxe MdeModulePkg/ResetSystemRuntimeDxe: Change comments 2019-04-28 09:40:15 +08:00
SectionExtractionDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
SectionExtractionPei MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
SecurityStubDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
SerialDxe MdeModulePkg: Introduce EDKII_SERIAL_PORT_LIB_VENDOR_GUID 2019-06-14 21:26:28 +02:00
SetupBrowserDxe MdeModulePkg: Fix typos and add periods 2019-08-02 14:19:13 +08:00
SmbiosDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
SmbiosMeasurementDxe MdeModulePkg SmbiosMeasurementDxe: Add Type4 Voltage field to blacklist 2019-07-01 19:36:15 +08:00
SmmCommunicationBufferDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
StatusCodeHandler MdeModulePkg/StatusCodeHandlerRuntimeDxe: make global variable static 2019-04-28 10:54:28 +08:00
TimestampDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Variable MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
WatchdogTimerDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00