From c3d8cfd066998862656706bb00d15ad986470fe5 Mon Sep 17 00:00:00 2001 From: Roland Veloz Date: Fri, 23 Aug 2019 20:00:36 -0500 Subject: 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 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Glenn Miles Reviewed-by: Zachary Clark Reviewed-by: Christian R Geddes --- src/include/runtime/interface.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/include/runtime/interface.h') diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index 152226d54..638bf8b89 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -593,17 +593,19 @@ typedef struct hostInterfaces // Arm the NV logic HBRT_FW_NVDIMM_ARM = 0x0010, - /// The following operation pertains to the Health of the NVDIMM + /// The following operations pertain to the Health of the NVDIMM /// This operation can be performed with the arming/disarming /// operation, these operation types are orthogonal to each other - // Manufacturing energy source(ES) health check request + // Manufacturing(MNFG) energy source(ES) health check request HBRT_FW_MNFG_ES_HEALTH_CHECK = 0x0020, + // Manufacturing(MNFG) non-volatile memory(NVM) health check request + HBRT_FW_MNFG_NVM_HEALTH_CHECK = 0x0040 }; // NVDIMM (PHYP -> HBRT) message to request NVDIMM operation(s) struct nvdimm_operation_t { - uint64_t procId; // Retrieve all NVDIMMs under the processor ID, all + uint64_t procId; // Retrieve all NVDIMMs under the processor ID; all // FFs (HBRT_NVDIMM_OPERATION_APPLY_TO_ALL_NVDIMMS) // means operate on all NVDIMMs in the system uint32_t rsvd1; // reserved -- cgit v1.2.1