summaryrefslogtreecommitdiffstats
path: root/src/usr/util/runtime/rt_fwnotify.C
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/usr/util/runtime/rt_fwnotify.C
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/usr/util/runtime/rt_fwnotify.C')
-rw-r--r--src/usr/util/runtime/rt_fwnotify.C15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/usr/util/runtime/rt_fwnotify.C b/src/usr/util/runtime/rt_fwnotify.C
index 44a5a7dba..589f8d72f 100644
--- a/src/usr/util/runtime/rt_fwnotify.C
+++ b/src/usr/util/runtime/rt_fwnotify.C
@@ -263,12 +263,12 @@ void occActiveNotification( void * i_data )
if (*l_active)
{
l_err = NVDIMM::notifyNvdimmProtectionChange(l_proc,
- NVDIMM::PROTECTED);
+ NVDIMM::OCC_ACTIVE);
}
else
{
l_err = NVDIMM::notifyNvdimmProtectionChange(l_proc,
- NVDIMM::NOT_PROTECTED);
+ NVDIMM::OCC_INACTIVE);
}
// commit error if it exists
@@ -479,6 +479,17 @@ void doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& nvDimmOp)
// Enable encryption on the NVDIMM
if (nvDimmOp.opType & hostInterfaces::HBRT_FW_NVDIMM_ENABLE_ENCRYPTION)
{
+ // Set the encryption enable attribute
+ Target* l_sys = nullptr;
+ targetService().getTopLevelTarget( l_sys );
+ assert(l_sys, "doNvDimmOperation: no TopLevelTarget");
+ if (!l_sys->getAttr<ATTR_NVDIMM_ENCRYPTION_ENABLE>())
+ {
+ l_sys->setAttr<ATTR_NVDIMM_ENCRYPTION_ENABLE>(0x1);
+
+ // TODO RTC 210692 Update HWSV with enable attribute value
+ }
+
// Make call to generate keys before enabling encryption
if(!nvdimm_gen_keys())
{
OpenPOWER on IntegriCloud