diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 16 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types.xml | 3 | ||||
-rw-r--r-- | src/usr/util/runtime/rt_fwnotify.C | 11 |
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 { |