summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2019-06-12 11:59:56 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-06-18 17:13:24 -0500
commit7508722e0908dae7096a98d502dbef9917f5857a (patch)
treeb8905b5414b81098fa2f905f990318838b812635 /src/include
parent0c4e786e0e95cce19fa878c47f3399c0be463f69 (diff)
downloadtalos-hostboot-7508722e0908dae7096a98d502dbef9917f5857a.tar.gz
talos-hostboot-7508722e0908dae7096a98d502dbef9917f5857a.zip
Handle NVDIMM encryption errors
Update ATTR_NVDIMM_ARMED and ATTR_NV_STATUS_FLAG Update notifyNvdimmProtectionChange() Set encryption error and check before arm/disarm Change-Id: I1edf738af3460684ee93b02f06ff417c3e72d4e3 RTC:210689 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78828 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/isteps/nvdimm/nvdimm.H32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/include/usr/isteps/nvdimm/nvdimm.H b/src/include/usr/isteps/nvdimm/nvdimm.H
index 7325c9a7c..9b37765f8 100644
--- a/src/include/usr/isteps/nvdimm/nvdimm.H
+++ b/src/include/usr/isteps/nvdimm/nvdimm.H
@@ -83,9 +83,6 @@ bool nvdimm_encrypt_unlock(TARGETING::TargetHandleList &i_nvdimmList);
#endif
-// TODO RTC:210689 Handle return pass/fail
-// Need to define what return=false means for the caller
-// For all of the functions in this file
/**
* @brief Entry function to NVDIMM generate keys
* Generate encryption keys and set the FW key attribute
@@ -198,23 +195,34 @@ bool nvdimmDisarm(TARGETING::TargetHandleList &i_nvdimmTargetList);
/**
* @brief NVDIMM protection state
*
- * NOT_PROTECTED - default state
- * PROTECTED - switches to this when armed & OCC is in control
- * UNPROTECTED_BECAUSE_ERROR - PRD detected error on NV controller
- * Note: error will stay with target preventing PROTECTED status
- * until power is cycled again
+ * NVDIMM_ARMED - set armed state
+ * NVDIMM_DISARMED - set disarmed state
+ * OCC_ACTIVE - set active state
+ * OCC_INACTIVE - set inactive state
+ * NVDIMM_FATAL_HW_ERROR - set fatal hw state
+ * NVDIMM_RISKY_HW_ERROR - set risky hw state
+ * Note: fatal error will stay with target preventing
+ * PROTECTED status until power is cycled again
*/
enum nvdimm_protection_t
{
- NOT_PROTECTED = 0,
- PROTECTED = 1,
- UNPROTECTED_BECAUSE_ERROR = 2
+ NVDIMM_ARMED = 0,
+ NVDIMM_DISARMED = 1,
+ OCC_ACTIVE = 2,
+ OCC_INACTIVE = 3,
+ NVDIMM_FATAL_HW_ERROR = 4,
+ NVDIMM_RISKY_HW_ERROR = 5,
+ /* deprecated, still used by PRD */
+ UNPROTECTED_BECAUSE_ERROR = 4,
};
/**
* @brief Notify PHYP of NVDIMM protection status
*
- * @param i_target Processor with NVDIMM
+ * @param i_target Processor with NVDIMM or NVDIMM itself
+ * - ARMED state updated per NVDIMM
+ * - ERROR states updated per NVDIMM
+ * - OCC state updated per PROC
* @param i_state Protection state of NVDIMM
*/
errlHndl_t notifyNvdimmProtectionChange(TARGETING::Target* i_target,
OpenPOWER on IntegriCloud