Skip to content

Commit e8977d7

Browse files
sshetty1991StevenPontsler
authored andcommitted
Fix to update DIMM location correctly when PMTT table is missing.
Signed-off-by: Sandesh Shetty <[email protected]>
1 parent 4e6f359 commit e8977d7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

DcpmPkg/driver/Utils/PlatformConfigData.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,21 +307,21 @@ GeneratePcdConfInput(
307307
pIdentInfo->DimmLocation.AsUint64 = 0;
308308
// Update the DIMM location field
309309
pPmttModuleInfo = GetDimmModuleByPidFromPmtt(pDimm->pRegionsGoal[Index]->pDimms[Index2]->DimmID, gNvmDimmData->PMEMDev.pPmttHead);
310-
if (pPmttModuleInfo == NULL) {
311-
NVDIMM_ERR("DIMM Module with pid: %d not found in PMTT", pDimm->DimmID);
312-
pIdentInfo->DimmLocation.Split.SocketId = pDimm->SocketId;
313-
pIdentInfo->DimmLocation.Split.DieId = MAX_DIEID_SINGLE_DIE_SOCKET;
314-
pIdentInfo->DimmLocation.Split.MemControllerId = pDimm->ImcId;
315-
pIdentInfo->DimmLocation.Split.ChannelId = pDimm->ChannelId;
316-
pIdentInfo->DimmLocation.Split.SlotId = pDimm->ChannelPos;
317-
}
318-
else {
310+
if (pPmttModuleInfo != NULL) {
319311
pIdentInfo->DimmLocation.Split.SocketId = pPmttModuleInfo->SocketId;
320312
pIdentInfo->DimmLocation.Split.DieId = pPmttModuleInfo->DieId;
321313
pIdentInfo->DimmLocation.Split.MemControllerId = pPmttModuleInfo->MemControllerId;
322314
pIdentInfo->DimmLocation.Split.ChannelId = pPmttModuleInfo->ChannelId;
323315
pIdentInfo->DimmLocation.Split.SlotId = pPmttModuleInfo->SlotId;
324316
}
317+
else {
318+
NVDIMM_ERR("DIMM Module with pid: %d not found in PMTT", pDimm->pRegionsGoal[Index]->pDimms[Index2]->DimmID);
319+
pIdentInfo->DimmLocation.Split.SocketId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->SocketId;
320+
pIdentInfo->DimmLocation.Split.DieId = MAX_DIEID_SINGLE_DIE_SOCKET;
321+
pIdentInfo->DimmLocation.Split.MemControllerId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ImcId;
322+
pIdentInfo->DimmLocation.Split.ChannelId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ChannelId;
323+
pIdentInfo->DimmLocation.Split.SlotId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ChannelPos;
324+
}
325325

326326
pCurrentOffset = (UINT8 *)pCurrentOffset + sizeof(NVDIMM_IDENTIFICATION_INFORMATION3);
327327
}

0 commit comments

Comments
 (0)