diff options
author | Roland Veloz <rveloz@us.ibm.com> | 2019-08-23 20:00:36 -0500 |
---|---|---|
committer | Christian R Geddes <crgeddes@us.ibm.com> | 2019-09-03 09:49:31 -0500 |
commit | c3d8cfd066998862656706bb00d15ad986470fe5 (patch) | |
tree | f267927cbfb821659b4bd25107dcf1155a0b3ba2 /src/usr/util/runtime/rt_fwnotify.C | |
parent | e22e362f3cd9b96b845f8c51acd6da97c78554a4 (diff) | |
download | talos-hostboot-c3d8cfd066998862656706bb00d15ad986470fe5.tar.gz talos-hostboot-c3d8cfd066998862656706bb00d15ad986470fe5.zip |
Added code to support doing an NVM health check
Added a method that will do an NVM (non-volatile memory)
health check. In particular this method will check the
flash error counts and does a predictive callout
if the number of flash error counts exceeds the maximum
allowed. This method also checks the bad block percentage
and does a predictive callout if the number of bad block
percentage exceeds the maximum allowed. A predictive
callout is done if either or both fail the check.
Added support in the runtime commands to make the nvm health check
call as well.
Also, when I did the ES (energy source) health check method, I was
not very explicit in the method that it was doing an ES health
check. So I updated the verbiage in the nvDimmCheckHealthStatus
to add ES wherever appropriate as to make these two method
explicit as to what health check is being performed.
Change-Id: Ib9925fd2bb8430cf2121108329247d96072beb1b
CQ: 473220
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82843
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Glenn Miles <milesg@ibm.com>
Reviewed-by: Zachary Clark <zach@ibm.com>
Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/usr/util/runtime/rt_fwnotify.C')
-rw-r--r-- | src/usr/util/runtime/rt_fwnotify.C | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/usr/util/runtime/rt_fwnotify.C b/src/usr/util/runtime/rt_fwnotify.C index e9ebabe6d..350f4d1da 100644 --- a/src/usr/util/runtime/rt_fwnotify.C +++ b/src/usr/util/runtime/rt_fwnotify.C @@ -622,22 +622,40 @@ int doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp) } // end if (nvDimmOp.opType & hostInterfaces::HBRT_FW_NVDIMM_ARM) } while (0); // end Perform the arming/disarming operations. - // Perform the health check operation + // Perform the ES (energy source) health check operation if (i_nvDimmOp.opType & hostInterfaces::HBRT_FW_MNFG_ES_HEALTH_CHECK) { - if (!nvDimmCheckHealthStatus(l_nvDimmTargetList)) + if (!nvDimmEsCheckHealthStatus(l_nvDimmTargetList)) { TRACFCOMP(g_trac_runtime, "doNvDimmOperation: " - "Call to do a health check failed."); + "Call to do an ES (energy source) health check failed."); rc = -1; break; } else { TRACFCOMP(g_trac_runtime, "doNvDimmOperation: " - "Call to do a health check succeeded."); + "Call to do an ES (energy source) health check succeeded."); } } + + // Perform the NVM (non-volatile memory) health check operation + if (i_nvDimmOp.opType & hostInterfaces::HBRT_FW_MNFG_NVM_HEALTH_CHECK) + { + if (!nvDimmNvmCheckHealthStatus(l_nvDimmTargetList)) + { + TRACFCOMP(g_trac_runtime, "doNvDimmOperation: " + "Call to do a NVM (non-volatile memory) health check failed."); + rc = -1; + break; + } + else + { + TRACFCOMP(g_trac_runtime, "doNvDimmOperation: " + "Call to do a NVM (non-volatile memory) health check succeeded."); + } + } + } while(0); // end Perform the operations requested if (l_err) |