summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Table
diff options
context:
space:
mode:
authorJin, Eric <eric.jin@intel.com>2019-08-05 16:02:48 +0800
committerHao A Wu <hao.a.wu@intel.com>2019-08-07 13:18:32 +0800
commite314132feaac3f62a27f1a4ffaae8f5c1fba3140 (patch)
tree7d0796a3f364e0f44ffa048d43a0662ae357fbd4 /BaseTools/Source/Python/Table
parentc30fbac4e210a81695a7708997241de0535dbc28 (diff)
downloadedk2-e314132feaac3f62a27f1a4ffaae8f5c1fba3140.tar.gz
edk2-e314132feaac3f62a27f1a4ffaae8f5c1fba3140.tar.bz2
edk2-e314132feaac3f62a27f1a4ffaae8f5c1fba3140.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/Table')
0 files changed, 0 insertions, 0 deletions