Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 5403b4f

Browse files
Amy2Wanggldiviney
authored andcommitted
Insert in logic for clearing PackageSparing Policy Injection Error
Signed-off-by: Amy Wang <Amy2.Wang@intel.com>
1 parent 9a5f1a6 commit 5403b4f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

DcpmPkg/driver/Protocol/Driver/NvmDimmConfig.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9662,8 +9662,14 @@ InjectError(
96629662
ReturnCode = EFI_DEVICE_ERROR;
96639663
continue;
96649664
}
9665-
if (pDimms[Index]->SkuInformation.PackageSparingCapable &&
9666-
pPayloadPackageSparingPolicy->Supported && pPayloadPackageSparingPolicy->Enable) {
9665+
/* If the package sparing policy has been enabled and executed,
9666+
Support Bit will be 0x00 but the Enable Bit will still be 0x01
9667+
to indicate that the dimm has PackageSparing Policy Enabled before.
9668+
*/
9669+
if (pDimms[Index]->SkuInformation.PackageSparingCapable && pPayloadPackageSparingPolicy->Enable &&
9670+
((!ClearStatus && pPayloadPackageSparingPolicy->Supported) ||
9671+
(ClearStatus && !pPayloadPackageSparingPolicy->Supported))) {
9672+
//Inject the error if PackageSparing policy is available and is supported
96679673
ReturnCode = FwCmdInjectError(pDimms[Index], SubopSoftwareErrorTriggers, (VOID *)pInputPayload);
96689674
if (EFI_ERROR(ReturnCode)) {
96699675
SetObjStatusForDimm(pCommandStatus, pDimms[Index], NVM_ERR_OPERATION_FAILED);

0 commit comments

Comments
 (0)