summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2019-06-17 13:27:25 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-06-24 10:39:22 -0500
commitdd0aba64608a9d073ee7dcfc8e407ba0f47f0398 (patch)
tree130239784c4452e45791258b8c62767b3bd08921
parent164e8bc5fc070dfcffb7ce86077161259f01af93 (diff)
downloadblackbird-hostboot-dd0aba64608a9d073ee7dcfc8e407ba0f47f0398.tar.gz
blackbird-hostboot-dd0aba64608a9d073ee7dcfc8e407ba0f47f0398.zip
Auto-arm the NVDIMMs at runtime
Add control attribute and auto-arm NVDIMMs when OCC is enabled at runtime. Change-Id: I2e897e25f83b3c0ff51ddbaf3d922f07156d5747 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79069 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml16
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml3
-rw-r--r--src/usr/util/runtime/rt_fwnotify.C11
3 files changed, 30 insertions, 0 deletions
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index 1637e2903..cce773a1e 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -5132,6 +5132,22 @@
</attribute>
<attribute>
+ <id>NVDIMM_AUTO_ARM</id>
+ <description>
+ 0 - Do not automatically arm all NVDIMMS in the system at runtime
+ 1 - Automatically arm all NVDIMMS in the system at runtime
+ </description>
+ <simpleType>
+ <uint8_t>
+ <default>0</default>
+ </uint8_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+ <writeable/>
+ </attribute>
+
+ <attribute>
<id>NVDIMM_ENCRYPTION_ENABLE</id>
<description>
0 - Encryption is not enabled on all NVDIMMS in the system
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index 34441ee39..0b46660ff 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -2038,6 +2038,9 @@
<id>NUMERIC_POD_TYPE_TEST</id>
</attribute>
<attribute>
+ <id>NVDIMM_AUTO_ARM</id>
+ </attribute>
+ <attribute>
<id>NVDIMM_ENCRYPTION_ENABLE</id>
</attribute>
<attribute>
diff --git a/src/usr/util/runtime/rt_fwnotify.C b/src/usr/util/runtime/rt_fwnotify.C
index dab40ff13..754fafac4 100644
--- a/src/usr/util/runtime/rt_fwnotify.C
+++ b/src/usr/util/runtime/rt_fwnotify.C
@@ -266,6 +266,17 @@ void occActiveNotification( void * i_data )
{
l_err = NVDIMM::notifyNvdimmProtectionChange(l_proc,
NVDIMM::OCC_ACTIVE);
+ // Arm the nvdimms
+ Target* l_sys = nullptr;
+ targetService().getTopLevelTarget( l_sys );
+ assert(l_sys, "occActiveNotification: no TopLevelTarget");
+
+ if (l_sys->getAttr<ATTR_NVDIMM_AUTO_ARM>())
+ {
+ TARGETING::TargetHandleList l_nvdimmTargetList =
+ TARGETING::getProcNVDIMMs(l_proc);
+ NVDIMM::nvdimmArm(l_nvdimmTargetList);
+ }
}
else
{
OpenPOWER on IntegriCloud