Skip to content

Commit

Permalink
Added EFI_NOT_READY as a pseudo-success condition response from BIOS …
Browse files Browse the repository at this point in the history
…ArsStatus query.

Signed-off-by: Glenn L Diviney <[email protected]>
  • Loading branch information
gldiviney committed Feb 25, 2019
1 parent 6406ab7 commit 568c68d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions DcpmPkg/driver/Protocol/Driver/NvmDimmConfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -10134,7 +10134,13 @@ LoadArsList(
//First check how many records exist by passing NULL
sArsBadRecordsCount = 0;
ReturnCode = pDcpmmProtocol->DcpmmArsStatus(&sArsBadRecordsCount, NULL);
if (ReturnCode != EFI_NOT_READY && EFI_ERROR(ReturnCode)) {
if (ReturnCode == EFI_NOT_READY)
{
NVDIMM_WARN("BIOS reports not ready for full ARS list. The returned list may be partial.");
ReturnCode = EFI_SUCCESS;
}

if (EFI_ERROR(ReturnCode)) {
NVDIMM_WARN("Could not obtain the ARS bad address list count");
sArsBadRecordsCount = 0;
goto Finish;
Expand All @@ -10151,7 +10157,13 @@ LoadArsList(
}

ReturnCode = pDcpmmProtocol->DcpmmArsStatus(&sArsBadRecordsCount, sArsBadRecords);
if (ReturnCode != EFI_NOT_READY && EFI_ERROR(ReturnCode)) {
if (ReturnCode == EFI_NOT_READY)
{
NVDIMM_WARN("BIOS reports not ready for full ARS list. The returned list may be partial.");
ReturnCode = EFI_SUCCESS;
}

if (EFI_ERROR(ReturnCode)) {
NVDIMM_WARN("Could not obtain the ARS bad address list");
FreePool(sArsBadRecords);
sArsBadRecordsCount = 0;
Expand Down

0 comments on commit 568c68d

Please sign in to comment.