diff options
| author | Roland Veloz <rveloz@us.ibm.com> | 2019-07-18 02:37:26 -0500 |
|---|---|---|
| committer | Daniel M Crowell <dcrowell@us.ibm.com> | 2019-07-31 16:13:03 -0500 |
| commit | eafe3e3d5719c9becb864f60daa525f8ce2c38c0 (patch) | |
| tree | 98be7950a9d14637fe6d1202a7727ba965c96b77 /src/include/usr | |
| parent | f088a0dc26ed66496d593af1c0c291ac44f4cb4f (diff) | |
| download | blackbird-hostboot-eafe3e3d5719c9becb864f60daa525f8ce2c38c0.tar.gz blackbird-hostboot-eafe3e3d5719c9becb864f60daa525f8ce2c38c0.zip | |
Added support for checking on the health status of an NVDIMM
* The check for the health status piggy backs off the current
NVDIMM operation interface.
* Added the method doNvDimmCheckHealthStatus to perform the
health check status of the individual NVDIMMs.
* Added wrapper methods nvDimmCheckHealthStatusOnSystem and
nvdimmCheckHealthStatus that call the doNvDimmCheckHealthStatus
* Added an interface in the runtime commands to call make
the check health status call.
Change-Id: Iefa1fcf5cb6a13c496fd776cdc34ade58ae0612b
CQ:SW469962
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80589
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: Corey V Swenson <cswenson@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
| -rw-r--r-- | src/include/usr/isteps/nvdimm/nvdimm.H | 34 | ||||
| -rw-r--r-- | src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H | 5 |
2 files changed, 38 insertions, 1 deletions
diff --git a/src/include/usr/isteps/nvdimm/nvdimm.H b/src/include/usr/isteps/nvdimm/nvdimm.H index c07df0420..c1d6b334c 100644 --- a/src/include/usr/isteps/nvdimm/nvdimm.H +++ b/src/include/usr/isteps/nvdimm/nvdimm.H @@ -193,6 +193,39 @@ bool nvdimmArm(TARGETING::TargetHandleList &i_nvdimmTargetList); */ bool nvdimmDisarm(TARGETING::TargetHandleList &i_nvdimmTargetList); +/** + * @brief Check the health status of the individual NVDIMMs supplied in list + * + * @details The BPM will trigger the health check when power is applied at the + * beginning of the IPL, with results ready to check about 20 mins + * later. It is the caller's responsibility to ensure enough time has + * passed to make this call. + * Excerpt from the Jedec Standard, Byte Addressable Energy Backed + * Interface of the interested flags (bits 0 .. 2). + * ES_CMD_STATUS0 + * Bit 0 : Health Check in Progress + * Bit 1 : Health Check Succeeded + * Bit 2 : Health Check Failed + * + * @param[in] i_nvdimmTargetList - list of NVDIMMs to check the health of + * + * @return false if one or more NVDIMMs fail health check, else true + */ +bool nvDimmCheckHealthStatus(TARGETING::TargetHandleList &i_nvdimmTargetList); + +/** + * @brief A wrapper around the call to nvDimmCheckHealthStatus + * + * @details This will aggregate all the NVDIMMs of the system and pass + * them to the call nvDimmCheckHealthStatus + * + * @see nvDimmCheckHealthStatus for more details + * + * @return false if one or more NVDIMMs fail health check, else true + */ +bool nvDimmCheckHealthStatusOnSystem(); + + #endif /** @@ -241,7 +274,6 @@ errlHndl_t notifyNvdimmProtectionChange(TARGETING::Target* i_target, * @param i_target nvdimm target */ void nvdimm_init(TARGETING::Target *i_nvdimm); - } #endif // NVDIMM_EXT_H__ diff --git a/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H b/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H index 938361e54..8ed928a2d 100644 --- a/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H +++ b/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H @@ -98,6 +98,7 @@ enum nvdimmModuleId SET_ATTR_NVDIMM_ENCRYPTION_KEYS_FW = 0x30, SEND_ATTR_NVDIMM_ARMED = 0x31, NVDIMM_FACTORY_RESET = 0x32, + NVDIMM_HEALTH_CHECK = 0x33, }; /** @@ -161,6 +162,10 @@ enum nvdimmReasonCode NVDIMM_ENCRYPTION_MAX_DARN_ERRORS = NVDIMM_COMP_ID | 0x37, // Darn random key gen reached max errors NVDIMM_ENCRYPTION_BAD_RANDOM_DATA = NVDIMM_COMP_ID | 0x38, // Generated key data not valid NVDIMM_CANNOT_MAKE_ATTRIBUTE = NVDIMM_COMP_ID | 0x39, // Cannot make Attribute + NVDIMM_HEALTH_CHECK_IN_PROGRESS_FAILURE = NVDIMM_COMP_ID | 0x3A, // !< pertains to ES_CMD_STATUS0[0]; the health check in progress flag + NVDIMM_HEALTH_CHECK_REPORTED_FAILURE = NVDIMM_COMP_ID | 0x3B, // !< pertains to ES_CMD_STATUS0[2]; the health check reported a failure flag + NVDIMM_LIFETIME_MIN_REQ_NOT_MET = NVDIMM_COMP_ID | 0x3C, // !< pertains to ES_LIFETIME; BPM does not meet minimum requirement for a new BPM + NVDIMM_HEALTH_CHECK_NEVER_INITIATED = NVDIMM_COMP_ID | 0x3D, // !< A health check was never initiated at start of IPL }; enum UserDetailsTypes |

