diff options
Diffstat (limited to 'src/usr/targeting')
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 40 | ||||
-rwxr-xr-x | src/usr/targeting/targetservicestart.C | 23 |
2 files changed, 51 insertions, 12 deletions
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index 2ec701237..1637e2903 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -5095,12 +5095,33 @@ <field> <bits>1</bits> <default>0</default> - <description>NVDIMM controller error detected</description> - <name>error_detected</name> + <description>Is OCC active</description> + <name>occ_active</name> <type>uint8_t</type> </field> <field> - <bits>6</bits> + <bits>1</bits> + <default>0</default> + <description>NVDIMM controller fatal error detected</description> + <name>fatal_error_detected</name> + <type>uint8_t</type> + </field> + <field> + <bits>1</bits> + <default>0</default> + <description>NVDIMM controller risky error detected</description> + <name>risky_error_detected</name> + <type>uint8_t</type> + </field> + <field> + <bits>1</bits> + <default>0</default> + <description>NVDIMM encryption error detected</description> + <name>encryption_error_detected</name> + <type>uint8_t</type> + </field> + <field> + <bits>3</bits> <default>0</default> <description>Reserved for future use</description> <name>reserved</name> @@ -5211,10 +5232,15 @@ NVDIMM status flag. This is used to record the status and later report to OPAL/PHYP. Possible values: - 0x08 - contents not preserved (genesis) - 0x04 - contents preserved - 0x02 - failed to preserve contents - 0x01 - unable to preserve future contents + 0x01 - SCM device unable to persist memory contents + 0x02 - SCM device failed to persist memory contents + 0x04 - SCM device contents are persisted from previous IPL + 0x08 - SCM device contents are not persisted from previous IPL + 0x10 - SCM device memory life remaining is critically low + 0x20 - SCM device will be garded off next IPL due to failure + 0x40 - SCM contents cannot persist due to current platform health status + 0x80 - SCM device unable to persist memory contents, certain conditions + NOTE: set for virtual SCM devices, does not persist across reboot </description> <simpleType> <uint8_t> diff --git a/src/usr/targeting/targetservicestart.C b/src/usr/targeting/targetservicestart.C index 943b7befc..8e0d5dcdb 100755 --- a/src/usr/targeting/targetservicestart.C +++ b/src/usr/targeting/targetservicestart.C @@ -591,11 +591,24 @@ static void initializeAttributes(TargetService& i_targetService, (HB_INITIATED_PM_RESET_INACTIVE); // clear the NVDIMM arming status so it gets redone when OCC is active - ATTR_NVDIMM_ARMED_type l_nvdimms_armed_state = - l_chip->getAttr<ATTR_NVDIMM_ARMED>(); - // Only force rearming (error setting should persist) - l_nvdimms_armed_state.armed = 0; - l_chip->setAttr<ATTR_NVDIMM_ARMED>(l_nvdimms_armed_state); + TargetHandleList l_nvdimmTargetList = getProcNVDIMMs(l_chip); + for (auto const l_nvdimm : l_nvdimmTargetList) + { + ATTR_NVDIMM_ARMED_type l_armed_state = {}; + // TODO: RTC 211510 Move ATTR_NVDIMM_ARMED from proc_type to dimm type + //l_armed_state = l_nvdimm->getAttr<ATTR_NVDIMM_ARMED>(); + uint8_t l_tmp = l_nvdimm->getAttr<ATTR_SCRATCH_UINT8_1>(); + memcpy(&l_armed_state, &l_tmp, sizeof(l_tmp)); + + // Only force rearming (error setting should persist) + l_armed_state.armed = 0; + l_armed_state.occ_active = 0; + + // TODO: RTC 211510 Move ATTR_NVDIMM_ARMED from proc_type to dimm type + //l_nvdimm->setAttr<ATTR_NVDIMM_ARMED>(l_armed_state); + memcpy(&l_tmp, &l_armed_state, sizeof(l_tmp)); + l_nvdimm->setAttr<ATTR_SCRATCH_UINT8_1>(l_tmp); + } if (l_chip == l_pMasterProcChip) { |