Skip to content

Commit

Permalink
Changed the Logic for returning the correct ARSstatus
Browse files Browse the repository at this point in the history
Signed-off-by: Amy Wang <[email protected]>
  • Loading branch information
Amy2Wang authored and gldiviney committed Oct 24, 2018
1 parent b3b4f0c commit 8031c2d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
20 changes: 11 additions & 9 deletions DcpmPkg/driver/Core/Dimm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,16 +1628,18 @@ GetDimmARSStatusFromARSPayload(

*pDimmARSStatus = ARS_STATUS_UNKNOWN;

if (pARSPayload->Enable) {
*pDimmARSStatus = ARS_STATUS_IN_PROGRESS;
} else if (pARSPayload->DPACurrentAddress < pARSPayload->DPAEndAddress) {
if ((pARSPayload->DPACurrentAddress == pARSPayload->DPAEndAddress) && !(pARSPayload->Enable)) {
*pDimmARSStatus = ARS_STATUS_COMPLETED;
} else if ((pARSPayload->DPACurrentAddress > pARSPayload->DPAStartAddress) &&
(pARSPayload->DPACurrentAddress < pARSPayload->DPAEndAddress) &&
!(pARSPayload->Enable)) {
*pDimmARSStatus = ARS_STATUS_ABORTED;
} else if (pARSPayload->DPACurrentAddress == pARSPayload->DPAEndAddress) {
if (pARSPayload->DPACurrentAddress == 0x00) {
*pDimmARSStatus = ARS_STATUS_NOT_STARTED;
} else {
*pDimmARSStatus = ARS_STATUS_COMPLETED;
}
} else if ((pARSPayload->DPACurrentAddress == 0x00) || (pARSPayload->DPACurrentAddress == pARSPayload->DPAStartAddress)) {
*pDimmARSStatus = ARS_STATUS_NOT_STARTED;
} else if ((pARSPayload->DPACurrentAddress > pARSPayload->DPAStartAddress) && (pARSPayload->Enable)) {
*pDimmARSStatus = ARS_STATUS_IN_PROGRESS;
} else {
*pDimmARSStatus = ARS_STATUS_UNKNOWN;
}

Finish:
Expand Down
13 changes: 8 additions & 5 deletions Documentation/ipmctl/DIMM_Discovery/ipmctl-show-device.txt
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,16 @@ SKUViolation::
- 1: True

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



OverwriteStatus::
The overwrite DIMM operation status for the DCPMM. One of:
Expand Down

0 comments on commit 8031c2d

Please sign in to comment.