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 | |
parent | f088a0dc26ed66496d593af1c0c291ac44f4cb4f (diff) | |
download | talos-hostboot-eafe3e3d5719c9becb864f60daa525f8ce2c38c0.tar.gz talos-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')
-rw-r--r-- | src/include/runtime/interface.h | 8 | ||||
-rw-r--r-- | src/include/usr/isteps/nvdimm/nvdimm.H | 34 | ||||
-rw-r--r-- | src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H | 5 |
3 files changed, 46 insertions, 1 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index 7d66f0ff6..9a0cb478e 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -579,6 +579,8 @@ typedef struct hostInterfaces // error out. enum NVDIMM_Op_t: uint16_t { + /// The following operations pertain to arming/disarming + /// the NVDIMM // Disarm the NV logic such that the next save attempt is a NOOP HBRT_FW_NVDIMM_DISARM = 0x0001, // Disable encryption on the NVDIMM and clear saved values from FW @@ -589,6 +591,12 @@ typedef struct hostInterfaces HBRT_FW_NVDIMM_ENABLE_ENCRYPTION = 0x0008, // Arm the NV logic HBRT_FW_NVDIMM_ARM = 0x0010, + + /// The following operation pertains 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 + HBRT_FW_MNFG_ES_HEALTH_CHECK = 0x0020, }; // NVDIMM (PHYP -> HBRT) message to request NVDIMM operation(s) 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 |