mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
MdeModulePkg/EsrtFmpDxe: Support multiple devices with 0 HardwareInstance
Skip error check if HardwareInstance is 0 as this either means that FmpVersion < 3 and not supported or, "A zero means the FMP provider is not able to determine a unique hardware instance number or a hardware instance number is not needed." per UEFI specification. As the FmpInstances are merged and HardwareInstance is not used remove error check in this case. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
f9c6b5134e
commit
090642db7a
@ -153,16 +153,20 @@ CreateEsrtEntry (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Check to see of FmpImageInfoBuf GUID/HardwareInstance is unique
|
// Check to see of FmpImageInfoBuf GUID/HardwareInstance is unique
|
||||||
|
// Skip if HardwareInstance is 0 as this is the case if FmpVersion < 3
|
||||||
|
// or the device can not create a unique ID per UEFI specification
|
||||||
//
|
//
|
||||||
for (Index = 0; Index < *NumberOfDescriptors; Index++) {
|
if (FmpHardwareInstance != 0) {
|
||||||
if (CompareGuid (&HardwareInstances[Index].ImageTypeGuid, &FmpImageInfoBuf->ImageTypeId)) {
|
for (Index = 0; Index < *NumberOfDescriptors; Index++) {
|
||||||
if (HardwareInstances[Index].HardwareInstance == FmpHardwareInstance) {
|
if (CompareGuid (&HardwareInstances[Index].ImageTypeGuid, &FmpImageInfoBuf->ImageTypeId)) {
|
||||||
DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Duplicate firmware image descriptor with GUID %g HardwareInstance:0x%x\n", &FmpImageInfoBuf->ImageTypeId, FmpHardwareInstance));
|
if (HardwareInstances[Index].HardwareInstance == FmpHardwareInstance) {
|
||||||
ASSERT (
|
DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Duplicate firmware image descriptor with GUID %g HardwareInstance:0x%x\n", &FmpImageInfoBuf->ImageTypeId, FmpHardwareInstance));
|
||||||
!CompareGuid (&HardwareInstances[Index].ImageTypeGuid, &FmpImageInfoBuf->ImageTypeId) ||
|
ASSERT (
|
||||||
HardwareInstances[Index].HardwareInstance != FmpHardwareInstance
|
!CompareGuid (&HardwareInstances[Index].ImageTypeGuid, &FmpImageInfoBuf->ImageTypeId) ||
|
||||||
);
|
HardwareInstances[Index].HardwareInstance != FmpHardwareInstance
|
||||||
return EFI_UNSUPPORTED;
|
);
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user