Skip to content

Commit 1a06349

Browse files
chrisnjohnsonStevenPontsler
authored andcommitted
Fix create goal issue when using -dimm to create goals on a subset of DIMMs
When the -dimm target is used in create goal to specify DCPMMs on different sockets and the total number of DCPMMs specified is equal to the number of DCPMMs on a socket, the call to the IsConfigureWholeSocket() function inside of VerifyCreatingSupportedRegionConfigs() will succeed incorrectly. Instead of filtering out which specified DCPMMs are on which sockets, removing the call entirely fixes the issue with minimal overhead. Signed-off-by: Chris N. Johnson <[email protected]>
1 parent d919d32 commit 1a06349

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

DcpmPkg/driver/Core/Region.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,6 @@ VerifyCreatingSupportedRegionConfigs(
17871787
LIST_ENTRY *pDimmNode = NULL;
17881788
UINT32 Socket = 0;
17891789
UINT32 Index = 0;
1790-
BOOLEAN WholeSocket = FALSE;
17911790
UINT32 ExistingADNonInterleavedRegions = 0;
17921791
UINT32 ExistingVolatileRegions = 0;
17931792
UINT32 NumOfDimmsOnSocket = 0;
@@ -1805,14 +1804,6 @@ VerifyCreatingSupportedRegionConfigs(
18051804
NumOfDimmsOnSocket = 0;
18061805
ExistingADNonInterleavedRegions = 0;
18071806
ExistingVolatileRegions = 0;
1808-
WholeSocket = FALSE;
1809-
1810-
Rc = IsConfigureWholeSocket(DimmsNum, Socket, &WholeSocket);
1811-
if (EFI_ERROR(Rc)) {
1812-
ResetCmdStatus(pCommandStatus, NVM_ERR_OPERATION_FAILED);
1813-
NVDIMM_DBG("Unable to determine if goal request is configuring entire socket or adding unconfigured dimms");
1814-
goto Finish;
1815-
}
18161807

18171808
/** Get a number of all configured and unconfigured Dimms on a given socket **/
18181809
LIST_FOR_EACH(pDimmNode, &gNvmDimmData->PMEMDev.Dimms) {
@@ -1829,7 +1820,7 @@ VerifyCreatingSupportedRegionConfigs(
18291820
UnconfiguredDimmsNum += 1;
18301821
}
18311822

1832-
if (!WholeSocket && !IsPointerInArray((VOID **)pDimms, DimmsNum, pDimm)) {
1823+
if (!IsPointerInArray((VOID **)pDimms, DimmsNum, pDimm)) {
18331824
// Calculate the ADx1 regions on the unspecified DIMMs
18341825
if (pDimm->VolatileCapacity == 0 &&
18351826
pDimm->ISsNfitNum > 0 &&

0 commit comments

Comments
 (0)