summaryrefslogtreecommitdiffstats
path: root/src/usr/util/runtime/rt_fwnotify.C
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2019-07-23 17:25:27 -0500
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-08-19 10:46:12 -0500
commitf691dc23accc3b86a8fc2c301c907aa7140955b1 (patch)
treed4df65397c613f202b5f17bfec807e7a4770f27f /src/usr/util/runtime/rt_fwnotify.C
parente05083bbd3e02927b9a9205d805bd87b6bb5f56c (diff)
downloadtalos-hostboot-f691dc23accc3b86a8fc2c301c907aa7140955b1.tar.gz
talos-hostboot-f691dc23accc3b86a8fc2c301c907aa7140955b1.zip
HBRT command from SBE to trigger NVDIMM operations
Add support for calling NVDIMM operations through the SBE message passing interface Change-Id: Iae94166a411f134771f461dd3a63806721904368 RTC:211725 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80856 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: Matt Derksen <mderkse1@us.ibm.com> Reviewed-by: Glenn Miles <milesg@ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/util/runtime/rt_fwnotify.C')
-rw-r--r--src/usr/util/runtime/rt_fwnotify.C14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/usr/util/runtime/rt_fwnotify.C b/src/usr/util/runtime/rt_fwnotify.C
index 252876524..a96b24bba 100644
--- a/src/usr/util/runtime/rt_fwnotify.C
+++ b/src/usr/util/runtime/rt_fwnotify.C
@@ -438,8 +438,9 @@ void set_ATTR_NVDIMM_ENCRYPTION_ENABLE(
* The current order is: disarm -> disable encryption -> remove keys ->
* enable encryption -> arm
**/
-void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
+int doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
{
+ int rc = 0;
#ifndef CONFIG_NVDIMM
TRACFCOMP(g_trac_runtime, ENTER_MRK"doNvDimmOperation: not an "
"NVDIMM configuration, this call becomes a noop.");
@@ -478,7 +479,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
"HB Target from processor ID 0x%0X, "
"exiting ...",
i_nvDimmOp.procId);
-
+ rc = -1;
break;
}
@@ -491,6 +492,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
{
TRACFCOMP(g_trac_runtime, "doNvDimmOperation: No NVDIMMs found, "
"exiting ...");
+ rc = -1;
break;
}
@@ -507,6 +509,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
TRACFCOMP(g_trac_runtime, "doNvDimmOperation: "
"Call to disarm failed. Will not perform any "
"more arming/disarming calls, if they exist");
+ rc = -1;
break;
}
else
@@ -531,6 +534,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
// Clear the encryption enable attribute
set_ATTR_NVDIMM_ENCRYPTION_ENABLE(0);
+ rc = -1;
break;
}
else
@@ -552,6 +556,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
TRACFCOMP(g_trac_runtime, "doNvDimmOperation: "
"Call to remove keys failed. Will not perform "
"any more arming/disarming calls, if they exist");
+ rc = -1;
break;
}
else
@@ -575,6 +580,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
"Call to generate keys failed, unable to enable "
"encryption. Will not perform any more "
"arming/disarming calls, if they exist");
+ rc = -1;
break;
}
else
@@ -586,6 +592,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
"Call to enable encryption failed. "
"Will not perform any more arming/disarming "
"calls, if they exist");
+ rc = -1;
break;
}
else
@@ -604,6 +611,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
{
TRACFCOMP(g_trac_runtime, "doNvDimmOperation: "
"Call to arm failed.");
+ rc = -1;
break;
}
else
@@ -621,6 +629,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
{
TRACFCOMP(g_trac_runtime, "doNvDimmOperation: "
"Call to do a health check failed.");
+ rc = -1;
break;
}
else
@@ -640,6 +649,7 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
#endif
TRACFCOMP(g_trac_runtime, EXIT_MRK"doNvDimmOperation")
+ return rc;
}
/**
OpenPOWER on IntegriCloud