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

Commit 8031c2d

Browse files
Amy2Wanggldiviney
authored andcommitted
Changed the Logic for returning the correct ARSstatus
Signed-off-by: Amy Wang <Amy2.Wang@intel.com>
1 parent b3b4f0c commit 8031c2d

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

DcpmPkg/driver/Core/Dimm.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,16 +1628,18 @@ GetDimmARSStatusFromARSPayload(
16281628

16291629
*pDimmARSStatus = ARS_STATUS_UNKNOWN;
16301630

1631-
if (pARSPayload->Enable) {
1632-
*pDimmARSStatus = ARS_STATUS_IN_PROGRESS;
1633-
} else if (pARSPayload->DPACurrentAddress < pARSPayload->DPAEndAddress) {
1631+
if ((pARSPayload->DPACurrentAddress == pARSPayload->DPAEndAddress) && !(pARSPayload->Enable)) {
1632+
*pDimmARSStatus = ARS_STATUS_COMPLETED;
1633+
} else if ((pARSPayload->DPACurrentAddress > pARSPayload->DPAStartAddress) &&
1634+
(pARSPayload->DPACurrentAddress < pARSPayload->DPAEndAddress) &&
1635+
!(pARSPayload->Enable)) {
16341636
*pDimmARSStatus = ARS_STATUS_ABORTED;
1635-
} else if (pARSPayload->DPACurrentAddress == pARSPayload->DPAEndAddress) {
1636-
if (pARSPayload->DPACurrentAddress == 0x00) {
1637-
*pDimmARSStatus = ARS_STATUS_NOT_STARTED;
1638-
} else {
1639-
*pDimmARSStatus = ARS_STATUS_COMPLETED;
1640-
}
1637+
} else if ((pARSPayload->DPACurrentAddress == 0x00) || (pARSPayload->DPACurrentAddress == pARSPayload->DPAStartAddress)) {
1638+
*pDimmARSStatus = ARS_STATUS_NOT_STARTED;
1639+
} else if ((pARSPayload->DPACurrentAddress > pARSPayload->DPAStartAddress) && (pARSPayload->Enable)) {
1640+
*pDimmARSStatus = ARS_STATUS_IN_PROGRESS;
1641+
} else {
1642+
*pDimmARSStatus = ARS_STATUS_UNKNOWN;
16411643
}
16421644

16431645
Finish:

Documentation/ipmctl/DIMM_Discovery/ipmctl-show-device.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,13 +436,16 @@ SKUViolation::
436436
- 1: True
437437

438438
ARSStatus::
439-
The address range scrub (ARS) operation status for the DCPMM. One of:
439+
The address range scrub (ARS) operation status for the DCPMM. The status is a
440+
reflection of the last requested ARS, but not necessarily within the current
441+
platform power cycle. One of:
440442
- Unknown - The ARS operation status cannot be determined.
441-
- Not started - An ARS operation was not run on the last boot.
443+
- Not started - An ARS operation has not started.
442444
- In progress - An ARS operation is currently in progress.
443-
- Completed - An ARS operation completed since the last boot.
444-
- Aborted - An ARS operation was started on the last boot but it did not
445-
complete because it aborted.
445+
- Completed - The last ARS operation has completed.
446+
- Aborted - An last ARS operation was aborted.
447+
448+
446449

447450
OverwriteStatus::
448451
The overwrite DIMM operation status for the DCPMM. One of:

0 commit comments

Comments
 (0)