Prevent multiple copies of missing DCPMM on broken IS
Correctly find the DCPMM on the list of broken ISs so it isn't readded
@@ -288,7 +288,7 @@ UpdateBrokenInterleaveSets(
// for each dimm identifier in the table
for (Index = 0; Index < pInterleaveInfo->NumOfDimmsInInterleaveSet; Index++) {
TmpDimmSerialNumber = pCurrentIdentInfo->DimmIdentification.Version1.DimmSerialNumber;
- TmpDimmUid = pCurrentIdentInfo->DimmIdentification.Version2.Uid;
+ CopyMem_S(&TmpDimmUid, sizeof(DIMM_UNIQUE_IDENTIFIER), &(pCurrentIdentInfo->DimmIdentification.Version2.Uid), sizeof(DIMM_UNIQUE_IDENTIFIER));
if (PcdRevision_1) {
pDimm = GetDimmBySerialNumber(&gNvmDimmData->PMEMDev.Dimms, TmpDimmSerialNumber);
} else {
@@ -311,7 +311,7 @@ UpdateBrokenInterleaveSets(
DimmIdFound = FALSE;
for (DimmIdIndex = 0; DimmIdIndex < pBrokenISs[BrokenISArrayIndex].MissingDimmCount; DimmIdIndex++) {
if (((PcdRevision_1) && (TmpDimmSerialNumber == pBrokenISs[BrokenISArrayIndex].MissingDimmIdentifier[DimmIdIndex].SerialNumber)) ||
- ((!PcdRevision_1) && (CompareMem(&TmpDimmUid, &pBrokenISs[BrokenISArrayIndex].MissingDimmIdentifier[DimmIdIndex],
+ ((!PcdRevision_1) && (0 == CompareMem(&TmpDimmUid, &pBrokenISs[BrokenISArrayIndex].MissingDimmIdentifier[DimmIdIndex],
sizeof(DIMM_UNIQUE_IDENTIFIER))))){
DimmIdFound = TRUE;
break;
@@ -448,8 +448,7 @@ CheckPlatformConfigurationData(
ReturnCode = GetPlatformConfigDataOemPartition(ppDimms[Index], &pPcdConfHeader);
#ifdef MEMORY_CORRUPTION_WA
- if (ReturnCode == EFI_DEVICE_ERROR)
- {
+ if (ReturnCode == EFI_DEVICE_ERROR) {
ReturnCode = GetPlatformConfigDataOemPartition(ppDimms[Index], &pPcdConfHeader);
}
#endif // MEMORY_CORRUPTION_WA
