summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/hwas/common/hwasCallout.H9
-rw-r--r--src/include/usr/targeting/common/util.H2
-rw-r--r--src/usr/errl/errlentry.C20
-rw-r--r--src/usr/errl/errlentry_consts.H3
-rw-r--r--src/usr/errl/plugins/errludcallout.H6
-rw-r--r--src/usr/errldisplay/errldisplay.C4
-rw-r--r--src/usr/isteps/nvdimm/nvdimm.C78
-rw-r--r--src/usr/isteps/nvdimm/nvdimm.H2
-rw-r--r--src/usr/isteps/nvdimm/runtime/nvdimm_rt.C14
-rw-r--r--src/usr/targeting/common/util.C2
10 files changed, 94 insertions, 46 deletions
diff --git a/src/include/usr/hwas/common/hwasCallout.H b/src/include/usr/hwas/common/hwasCallout.H
index adfed13d5..a91367a26 100644
--- a/src/include/usr/hwas/common/hwasCallout.H
+++ b/src/include/usr/hwas/common/hwasCallout.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2018 */
+/* Contributors Listed Below - COPYRIGHT 2012,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -159,6 +159,11 @@ enum epubProcedureID
EPUB_PRC_GPU_ISOLATION_PROCEDURE= 0x5E,
///< Problem is related to one or more installed GPUs,
///< Manual isolation is required to determine which one
+
+ EPUB_PRC_NVDIMM_ERR = 0x61,
+ ///< The diagnostic function detected a problem with the NVDIMM.
+ ///< Both the NVDIMM and the cable connecting the DIMM to the
+ ///< Backup Power Module should be replaced
};
// from srci/fsp/srci.H
@@ -218,6 +223,8 @@ enum partTypeEnum
PCI_REF_CLOCK = 11,
// @TODO 195920 Remove SMP_CABLE once HWSV code no longer references it
SMP_CABLE = 12, //Target is SMPGROUP
+ BPM_CABLE_PART_TYPE = 13, //Backup Power Module for NVDIMM
+ NV_CONTROLLER_PART_TYPE = 14,
};
enum sensorTypeEnum
diff --git a/src/include/usr/targeting/common/util.H b/src/include/usr/targeting/common/util.H
index aaf576919..6f0fcb307 100644
--- a/src/include/usr/targeting/common/util.H
+++ b/src/include/usr/targeting/common/util.H
@@ -204,7 +204,7 @@ uint8_t is_fused_mode( );
*
* @return bool - True if the given target is an NVDIMM
*/
-bool isNVDIMM( TARGETING::Target * i_target );
+bool isNVDIMM( const TARGETING::Target * i_target );
/**
* @brief Grab list of NVDIMMs under the processor
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index 370df7091..83dada55e 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -405,6 +405,18 @@ void ErrlEntry::addPartCallout(const TARGETING::Target *i_target,
i_target, i_partType, i_priority,
i_deconfigState, i_gardErrorType);
+ // Need targeting for nvdimm check
+ if(Util::isTargetingLoaded() && TARGETING::targetService().isInitialized())
+ {
+ // Add procedure callout to replace the cable to the NVDIMM
+ if( (i_target->getAttr<TARGETING::ATTR_TYPE>() == TARGETING::TYPE_DIMM)
+ && ( isNVDIMM(i_target) ) )
+ {
+ addProcedureCallout( HWAS::EPUB_PRC_NVDIMM_ERR,
+ HWAS::SRCI_PRIORITY_HIGH );
+ }
+ }
+
const void* pData = nullptr;
uint32_t size = 0;
TARGETING::EntityPath* ep = nullptr;
@@ -586,6 +598,14 @@ void ErrlEntry::addHwCallout(const TARGETING::Target *i_target,
get_huid(i_target), i_priority,
i_deconfigState, i_gardErrorType);
#endif
+
+ // Add procedure callout to replace the cable to the NVDIMM
+ if( isNVDIMM(i_target) )
+ {
+ addProcedureCallout( HWAS::EPUB_PRC_NVDIMM_ERR,
+ HWAS::SRCI_PRIORITY_HIGH );
+ }
+
TARGETING::EntityPath ep;
TARGETING::TYPE l_type = i_target->getAttr<TARGETING::ATTR_TYPE>();
diff --git a/src/usr/errl/errlentry_consts.H b/src/usr/errl/errlentry_consts.H
index 6236cd37f..e6784c217 100644
--- a/src/usr/errl/errlentry_consts.H
+++ b/src/usr/errl/errlentry_consts.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017,2018 */
+/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -66,6 +66,7 @@ const epubProcToSub_t PROCEDURE_TO_SUBSYS_TABLE[] =
{ EPUB_PRC_COOLING_SYSTEM_ERR , EPUB_MISC_SUBSYS },
{ EPUB_PRC_FW_VERIFICATION_ERR , EPUB_FIRMWARE_SUBSYS },
{ EPUB_PRC_GPU_ISOLATION_PROCEDURE, EPUB_CEC_HDW_SUBSYS },
+ { EPUB_PRC_NVDIMM_ERR , EPUB_MEMORY_SUBSYS },
};
struct epubTargetTypeToSub_t
diff --git a/src/usr/errl/plugins/errludcallout.H b/src/usr/errl/plugins/errludcallout.H
index e8bb364e9..b063f44b8 100644
--- a/src/usr/errl/plugins/errludcallout.H
+++ b/src/usr/errl/plugins/errludcallout.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2018 */
+/* Contributors Listed Below - COPYRIGHT 2013,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -149,6 +149,8 @@ case HWAS::_type: i_parser.PrintString( "Part Type", #_type); break;
case_PART_TYPE(PROC_REF_CLOCK)
case_PART_TYPE(PCI_REF_CLOCK)
case_PART_TYPE(SMP_CABLE)
+ case_PART_TYPE(BPM_CABLE_PART_TYPE)
+ case_PART_TYPE(NV_CONTROLLER_PART_TYPE)
default:
i_parser.PrintNumber( "Part Type", "UNKNOWN: 0x%X",
@@ -369,7 +371,7 @@ case HWAS::_type: i_parser.PrintString( "Priority", #_type); break;
#define case_FLAG(_type) \
case HWAS::_type: i_parser.PrintString( "Flag", #_type); break;
case_FLAG(FLAG_LINK_DOWN)
- case(HWAS::FLAG_NONE): break; //do not print anything
+ case(HWAS::FLAG_NONE): break; //do not print anything
default:
i_parser.PrintNumber( "Flag", "UNKNOWN: 0x%X",
ntohl(pData->flag) );
diff --git a/src/usr/errldisplay/errldisplay.C b/src/usr/errldisplay/errldisplay.C
index bfae1d1f3..9dc44d72f 100644
--- a/src/usr/errldisplay/errldisplay.C
+++ b/src/usr/errldisplay/errldisplay.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2018 */
+/* Contributors Listed Below - COPYRIGHT 2013,2019 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -297,6 +297,8 @@ case HWAS::_type: CONSOLE::displayf(NULL, " Part Type : %s", #_t
case_PART_TYPE(LPC_SLAVE_PART_TYPE)
case_PART_TYPE(GPIO_EXPANDER_PART_TYPE)
case_PART_TYPE(SPIVID_SLAVE_PART_TYPE)
+ case_PART_TYPE(BPM_CABLE_PART_TYPE)
+ case_PART_TYPE(NV_CONTROLLER_PART_TYPE)
default:
CONSOLE::displayf(NULL, " Part Type : UNKNOWN 0x%X",
callout->partType);
diff --git a/src/usr/isteps/nvdimm/nvdimm.C b/src/usr/isteps/nvdimm/nvdimm.C
index b472896e5..a41cd7f18 100644
--- a/src/usr/isteps/nvdimm/nvdimm.C
+++ b/src/usr/isteps/nvdimm/nvdimm.C
@@ -362,9 +362,12 @@ errlHndl_t nvdimmReady(Target *i_nvdimm)
ERRORLOG::ErrlEntry::NO_SW_CALLOUT );
l_err->collectTrace(NVDIMM_COMP_NAME, 1024 );
- //@TODO RTC 199645 - add HW callout on dimm target.
- //if nvdimm is not ready for access by now, this is
- //a failing indication on the NV controller
+
+ // If nvdimm is not ready for access by now, this is
+ // a failing indication on the NV controller
+ l_err->addPartCallout( i_nvdimm,
+ HWAS::NV_CONTROLLER_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH);
}
}while(0);
@@ -489,9 +492,12 @@ errlHndl_t nvdimmPollStatus ( Target *i_nvdimm,
ERRORLOG::ErrlEntry::NO_SW_CALLOUT );
l_err->collectTrace(NVDIMM_COMP_NAME, 1024 );
- //@TODO RTC 199645 - add HW callout on dimm target.
- //may have to move the error handling to the caller
- //as different op could have different error severity
+
+ // May have to move the error handling to the caller
+ // as different op could have different error severity
+ l_err->addPartCallout( i_nvdimm,
+ HWAS::NV_CONTROLLER_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH);
}
return l_err;
@@ -705,9 +711,12 @@ errlHndl_t nvdimmSetESPolicy(Target* i_nvdimm)
ERRORLOG::ErrlEntry::NO_SW_CALLOUT );
l_err->collectTrace(NVDIMM_COMP_NAME, 1024 );
- //@TODO RTC 199645 - add procedure callout on backup power source.
- //Failure setting the energy source policy could mean error on the
- //battery or even the cabling
+
+ // Failure setting the energy source policy could mean error on the
+ // battery or even the cabling
+ l_err->addPartCallout( i_nvdimm,
+ HWAS::BPM_CABLE_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH);
}
}while(0);
@@ -850,8 +859,10 @@ errlHndl_t nvdimmRestore(TargetHandleList i_nvdimmList, uint8_t &i_mpipl)
nvdimmSetStatusFlag(*it, NSTD_ERR_NOPRSV);
//@TODO RTC 199645 - add HW callout on dimm target
- //If we failed to de-assert reset_n, the dimm is pretty much useless.
- //Let's not restore if that happens
+ // If we failed to de-assert reset_n, the dimm is pretty much useless.
+ // Let's not restore if that happens
+ // The callout will be added inside the HWP
+ // Leaving this comment here as a reminder, will remove later
break;
}
}
@@ -866,7 +877,9 @@ errlHndl_t nvdimmRestore(TargetHandleList i_nvdimmList, uint8_t &i_mpipl)
nvdimmSetStatusFlag(*it, NSTD_ERR_NOPRSV);
//@TODO RTC 199645 - add HW callout on dimm target
- //Without SRE the data could be not reliably restored
+ // Without SRE the data could be not reliably restored
+ // The callout will be added inside the HWP
+ // Leaving this comment here as a reminder, will remove later
break;
}
it++;
@@ -889,8 +902,6 @@ errlHndl_t nvdimmRestore(TargetHandleList i_nvdimmList, uint8_t &i_mpipl)
l_err = nvdimmWriteReg(l_nvdimm, NVDIMM_FUNC_CMD, RESTORE_IMAGE);
if (l_err)
{
- //@TODO RTC 199645 - add HW callout on dimm target
- //failing here is likely an NV controller/i2c problem
nvdimmSetStatusFlag(l_nvdimm, NSTD_ERR_NOPRSV);
TRACFCOMP(g_trac_nvdimm, ERR_MRK"NDVIMM HUID[%X], error initiating restore!!",
TARGETING::get_huid(l_nvdimm));
@@ -912,8 +923,6 @@ errlHndl_t nvdimmRestore(TargetHandleList i_nvdimmList, uint8_t &i_mpipl)
l_err = nvdimmPollRestoreDone(l_nvdimm, l_poll);
if (l_err)
{
- //@TODO RTC 199645 - add HW callout on dimm target
- //Restore is taking longer than the allotted time here.
nvdimmSetStatusFlag(l_nvdimm, NSTD_ERR_NOPRSV);
TRACFCOMP(g_trac_nvdimm, ERR_MRK"NDVIMM HUID[%X], error restoring!",
TARGETING::get_huid(l_nvdimm));
@@ -933,8 +942,6 @@ errlHndl_t nvdimmRestore(TargetHandleList i_nvdimmList, uint8_t &i_mpipl)
l_err = nvdimmGetRestoreValid(l_nvdimm, l_rstrValid);
if (l_err)
{
- //@TODO RTC 199645 - add HW callout on dimm target
- //failing here is likely an NV controller/i2c problem
nvdimmSetStatusFlag(l_nvdimm, NSTD_ERR_NOPRSV);
TRACFCOMP(g_trac_nvdimm, ERR_MRK"nvdimmRestore Target[%X] error validating restore status!",
TARGETING::get_huid(l_nvdimm));
@@ -966,9 +973,12 @@ errlHndl_t nvdimmRestore(TargetHandleList i_nvdimmList, uint8_t &i_mpipl)
l_err->collectTrace(NVDIMM_COMP_NAME, 1024 );
nvdimmSetStatusFlag(l_nvdimm, NSTD_ERR_NOPRSV);
- //@TODO RTC 199645 - add HW callout on dimm target
- //Invalid restore could be due to dram not in self-refresh
- //or controller issue. Data should not be trusted at this point
+
+ // Invalid restore could be due to dram not in self-refresh
+ // or controller issue. Data should not be trusted at this point
+ l_err->addPartCallout( l_nvdimm,
+ HWAS::NV_CONTROLLER_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH);
break;
}
}
@@ -1066,10 +1076,13 @@ errlHndl_t nvdimmCheckEraseSuccess(Target *i_nvdimm)
l_err->collectTrace(NVDIMM_COMP_NAME, 1024 );
errlCommit( l_err, NVDIMM_COMP_ID );
- //@TODO RTC 199645 - add HW callout on dimm target.
- //failure to erase could mean internal NV controller error and/or
- //HW error on nand flash. NVDIMM will lose persistency if failed to
- //erase nand flash
+
+ // Failure to erase could mean internal NV controller error and/or
+ // HW error on nand flash. NVDIMM will lose persistency if failed to
+ // erase nand flash
+ l_err->addPartCallout( i_nvdimm,
+ HWAS::NV_CONTROLLER_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH);
}
TRACUCOMP(g_trac_nvdimm, EXIT_MRK"nvdimmCheckEraseSuccess(): nvdimm[%X] ret[%X]",
@@ -1210,9 +1223,12 @@ errlHndl_t nvdimmOpenPage(Target *i_nvdimm,
ERRORLOG::ErrlEntry::NO_SW_CALLOUT );
l_err->collectTrace(NVDIMM_COMP_NAME, 256 );
- //@TODO RTC 199645 - add HW callout on dimm target.
- //failure to open page most likely means problem with
- //the NV controller.
+
+ // Failure to open page most likely means problem with
+ // the NV controller.
+ l_err->addPartCallout( i_nvdimm,
+ HWAS::NV_CONTROLLER_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH);
}
}while(0);
@@ -1340,8 +1356,6 @@ void nvdimm_restore(TargetHandleList &i_nvdimmList)
if (l_err)
{
- //@TODO RTC 199645 - add HW callout on dimm target
- //Backup is taking longer than the allotted time here.
nvdimmSetStatusFlag(l_nvdimm, NSTD_ERR_NOPRSV);
TRACFCOMP(g_trac_nvdimm, ERR_MRK"nvdimm_restore() nvdimm[%X], error backing up the DRAM!",
TARGETING::get_huid(l_nvdimm));
@@ -1427,8 +1441,6 @@ void nvdimm_init(Target *i_nvdimm)
if (l_err)
{
- //@TODO RTC 199645 - add HW callout on dimm target
- //Backup is taking longer than the allotted time here.
nvdimmSetStatusFlag(i_nvdimm, NSTD_ERR_NOPRSV);
TRACFCOMP(g_trac_nvdimm, ERR_MRK"nvdimm_int() nvdimm[%X], error backing up the DRAM!",
TARGETING::get_huid(i_nvdimm));
@@ -1443,8 +1455,6 @@ void nvdimm_init(Target *i_nvdimm)
if (l_err)
{
- //@TODO RTC 199645 - add HW callout on dimm target
- //Failed to disarm the reset_n trigger
nvdimmSetStatusFlag(i_nvdimm, NSTD_ERR_NOPRSV);
TRACFCOMP(g_trac_nvdimm, ERR_MRK"nvdimm_init() nvdimm[%X], error disarming the nvdimm!",
TARGETING::get_huid(i_nvdimm));
diff --git a/src/usr/isteps/nvdimm/nvdimm.H b/src/usr/isteps/nvdimm/nvdimm.H
index 4457424cb..2d4a223f3 100644
--- a/src/usr/isteps/nvdimm/nvdimm.H
+++ b/src/usr/isteps/nvdimm/nvdimm.H
@@ -307,7 +307,7 @@ enum i2c_out_values : uint8_t
RSTR_IN_PROGRESS = 0x09,
ERASE_IN_PROGRESS = 0x11,
ARM_IN_PROGRESS = 0x41,
- CHARGE_IN_PROGRESS = 0x41,
+ CHARGE_IN_PROGRESS = 0x01,
SAVE_SUCCESS = 0x01,
RSTR_SUCCESS = 0X01,
ARM_SUCCESS = 0X09,
diff --git a/src/usr/isteps/nvdimm/runtime/nvdimm_rt.C b/src/usr/isteps/nvdimm/runtime/nvdimm_rt.C
index e4040f546..a920f5ef9 100644
--- a/src/usr/isteps/nvdimm/runtime/nvdimm_rt.C
+++ b/src/usr/isteps/nvdimm/runtime/nvdimm_rt.C
@@ -308,10 +308,16 @@ errlHndl_t nvdimmCheckArmSuccess(TARGETING::Target *i_nvdimm)
ERRORLOG::ErrlEntry::NO_SW_CALLOUT );
l_err->collectTrace(NVDIMM_COMP_NAME, 256 );
- //@TODO RTC 199645 - add HW callout on dimm target
- //failure to arm could mean internal NV controller error or
- //even error on the battery pack. NVDIMM will lose persistency
- //if failed to arm trigger
+
+ // Failure to arm could mean internal NV controller error or
+ // even error on the battery pack. NVDIMM will lose persistency
+ // if failed to arm trigger
+ l_err->addPartCallout( i_nvdimm,
+ HWAS::NV_CONTROLLER_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH);
+ l_err->addPartCallout( i_nvdimm,
+ HWAS::BPM_CABLE_PART_TYPE,
+ HWAS::SRCI_PRIORITY_MED);
}
TRACUCOMP(g_trac_nvdimm, EXIT_MRK"nvdimmCheckArmSuccess() nvdimm[%X] ret[%X]",
diff --git a/src/usr/targeting/common/util.C b/src/usr/targeting/common/util.C
index 286c37b6c..686a491cd 100644
--- a/src/usr/targeting/common/util.C
+++ b/src/usr/targeting/common/util.C
@@ -282,7 +282,7 @@ uint8_t is_fused_mode( )
} // end is_fused_mode
-bool isNVDIMM( TARGETING::Target * i_target )
+bool isNVDIMM( const TARGETING::Target * i_target )
{
// Not the most elegant way of doing it but the hybrid attributes
// are at the MCS level. Need to find my way up to MCS and check
OpenPOWER on IntegriCloud