Skip to content

Commit

Permalink
Fix to update DIMM location correctly when PMTT table is missing.
Browse files Browse the repository at this point in the history
Signed-off-by: Sandesh Shetty <[email protected]>
  • Loading branch information
sshetty1991 authored and StevenPontsler committed Mar 3, 2020
1 parent 4e6f359 commit e8977d7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions DcpmPkg/driver/Utils/PlatformConfigData.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,21 +307,21 @@ GeneratePcdConfInput(
pIdentInfo->DimmLocation.AsUint64 = 0;
// Update the DIMM location field
pPmttModuleInfo = GetDimmModuleByPidFromPmtt(pDimm->pRegionsGoal[Index]->pDimms[Index2]->DimmID, gNvmDimmData->PMEMDev.pPmttHead);
if (pPmttModuleInfo == NULL) {
NVDIMM_ERR("DIMM Module with pid: %d not found in PMTT", pDimm->DimmID);
pIdentInfo->DimmLocation.Split.SocketId = pDimm->SocketId;
pIdentInfo->DimmLocation.Split.DieId = MAX_DIEID_SINGLE_DIE_SOCKET;
pIdentInfo->DimmLocation.Split.MemControllerId = pDimm->ImcId;
pIdentInfo->DimmLocation.Split.ChannelId = pDimm->ChannelId;
pIdentInfo->DimmLocation.Split.SlotId = pDimm->ChannelPos;
}
else {
if (pPmttModuleInfo != NULL) {
pIdentInfo->DimmLocation.Split.SocketId = pPmttModuleInfo->SocketId;
pIdentInfo->DimmLocation.Split.DieId = pPmttModuleInfo->DieId;
pIdentInfo->DimmLocation.Split.MemControllerId = pPmttModuleInfo->MemControllerId;
pIdentInfo->DimmLocation.Split.ChannelId = pPmttModuleInfo->ChannelId;
pIdentInfo->DimmLocation.Split.SlotId = pPmttModuleInfo->SlotId;
}
else {
NVDIMM_ERR("DIMM Module with pid: %d not found in PMTT", pDimm->pRegionsGoal[Index]->pDimms[Index2]->DimmID);
pIdentInfo->DimmLocation.Split.SocketId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->SocketId;
pIdentInfo->DimmLocation.Split.DieId = MAX_DIEID_SINGLE_DIE_SOCKET;
pIdentInfo->DimmLocation.Split.MemControllerId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ImcId;
pIdentInfo->DimmLocation.Split.ChannelId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ChannelId;
pIdentInfo->DimmLocation.Split.SlotId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ChannelPos;
}

pCurrentOffset = (UINT8 *)pCurrentOffset + sizeof(NVDIMM_IDENTIFICATION_INFORMATION3);
}
Expand Down

0 comments on commit e8977d7

Please sign in to comment.