summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorDzuy Nguyen <dzuy@us.ibm.com>2017-06-15 10:26:41 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-06-30 10:19:26 -0400
commit205f3c45a0651b88f2b3c1cfc20940b59a6c4c14 (patch)
tree3579c63caa2ddabe0cffe2a1e4ce5491e78806b7 /src/usr
parent178ec2a3c04b60d6abba4a6a9d344c9fb6f61027 (diff)
downloadtalos-hostboot-205f3c45a0651b88f2b3c1cfc20940b59a6c4c14.tar.gz
talos-hostboot-205f3c45a0651b88f2b3c1cfc20940b59a6c4c14.zip
Add error handling to TOD code
Change-Id: I8485b7180aaccc6c8d7db1ba7279933b10d94435 RTC: 161602 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41881 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> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rwxr-xr-xsrc/usr/isteps/istep18/TodControls.C122
-rwxr-xr-xsrc/usr/isteps/istep18/TodControls.H7
-rwxr-xr-xsrc/usr/isteps/istep18/TodDrawer.C14
-rwxr-xr-xsrc/usr/isteps/istep18/TodHwpIntf.C60
-rwxr-xr-xsrc/usr/isteps/istep18/TodSvc.C7
-rwxr-xr-xsrc/usr/isteps/istep18/TodSvcUtil.C23
6 files changed, 99 insertions, 134 deletions
diff --git a/src/usr/isteps/istep18/TodControls.C b/src/usr/isteps/istep18/TodControls.C
index c22f64984..e30844966 100755
--- a/src/usr/isteps/istep18/TodControls.C
+++ b/src/usr/isteps/istep18/TodControls.C
@@ -49,6 +49,7 @@
#include <p9_perv_scom_addresses.H>
#include <p9_tod_setup.H>
#include <errl/errlentry.H>
+#include <errl/errludtarget.H>
#include <p9_tod_utils.H>
#include <isteps/tod_init_reasoncodes.H>
@@ -152,6 +153,7 @@ errlHndl_t TodControls ::pickMdmt(const p9_tod_setup_tod_sel i_config)
GETHUID(l_procItr->getTarget()),
l_drwItr->getId(),
i_config);
+ errlCommit(l_errHdl, TOD_COMP_ID);
}
break;
}
@@ -214,6 +216,7 @@ errlHndl_t TodControls ::pickMdmt(const p9_tod_setup_tod_sel i_config)
getAttr<TARGETING::ATTR_HUID>(),
l_pTodDrw->getId(),
i_config);
+ errlCommit(l_errHdl, TOD_COMP_ID);
}
}
}
@@ -234,11 +237,37 @@ errlHndl_t TodControls ::pickMdmt(const p9_tod_setup_tod_sel i_config)
* @custdesc Host Processor Firmware couldn't detect any
* functional master processor required to boot the host
*/
+ const bool hbSwError = true;
l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_PICK_MDMT,
TOD_MASTER_TARGET_NOT_FOUND,
- i_config);
+ i_config,
+ hbSwError);
+
+ //Check the list of garded targets on the system and pick the garded
+ //targets for adding it into FFDC data.
+ //
+ std::vector<TARGETING::ATTR_HUID_type>::iterator l_iter;
+
+ for ( l_iter = iv_gardedTargets.begin();
+ l_iter != iv_gardedTargets.end();
+ ++l_iter )
+ {
+ //Get the target corresponding to the HUID stored in
+ //iv_gardedTargets
+ TARGETING::Target* l_pTarget =
+ TARGETING::Target::getTargetFromHuid(*l_iter);
+ if ( l_pTarget )
+ {
+ if ( TARGETING::TYPE_PROC == GETTYPE(l_pTarget))
+ {
+ // Add garded PROC targets into the errorlog
+ ERRORLOG::ErrlUserDetailsTarget(l_pTarget,
+ "GARDed Part").addToLog(l_errHdl);
+ }
+ }
+ }
}
else
{
@@ -300,11 +329,13 @@ errlHndl_t TodControls::buildTodDrawers(
* @userdata1 system target's HUID
* @devdesc MDMT could not find a functional node
*/
+ const bool hbSwError = true;
l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_BUILD_TOD_DRAWERS,
TOD_NO_FUNC_NODE_AVAILABLE,
- l_pSysTarget->getAttr<ATTR_HUID>());
+ l_pSysTarget->getAttr<ATTR_HUID>(),
+ hbSwError);
break;
}
@@ -426,6 +457,11 @@ errlHndl_t TodControls::buildTodDrawers(
TOD_BUILD_TOD_DRAWERS,
TOD_NO_DRAWERS,
i_config);
+
+ l_errHdl->addProcedureCallout(
+ HWAS::EPUB_PRC_FIND_DECONFIGURED_PART,
+ HWAS::SRCI_PRIORITY_LOW);
+
}
}while(0);
@@ -568,7 +604,7 @@ errlHndl_t TodControls ::queryActiveConfig(
* configuring Time Of Day on the Host processors
*/
l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_QUERY_ACTIVE_CONFIG,
TOD_NO_VALID_MDMT_FOUND);
break;
@@ -683,11 +719,13 @@ errlHndl_t TodControls ::queryActiveConfig(
* @custdesc Service Processor Firmware encountered an
* internal error
*/
+ const bool hbSwError = true;
l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_QUERY_ACTIVE_CONFIG,
TOD_NO_MDMT_ON_ACTIVE_CONFIG,
- o_activeConfig);
+ o_activeConfig,
+ hbSwError);
break;
}
}//isTodRunning check
@@ -1460,13 +1498,9 @@ errlHndl_t TodControls::gardGetGardedUnits(
{
TARGETING::Target * l_pTarget = NULL;
- l_err = getTargetFromPhysicalPath(l_iter.iv_targetId,
- l_pTarget);
- if(l_err != NULL)
- {
- TOD_ERR("Error finding target");
- break;
- }
+ // getTargetFromPhysicalPath will either succeed or assert
+ getTargetFromPhysicalPath(l_iter.iv_targetId, l_pTarget);
+
GardedUnit_t l_gardedUnit;
memset(&l_gardedUnit,0,sizeof(GardedUnit_t));
l_gardedUnit.iv_huid =
@@ -1526,39 +1560,22 @@ errlHndl_t TodControls::gardGetGardedUnits(
// getTargetFromPhysicalPath
//******************************************************************************
-errlHndl_t TodControls::getTargetFromPhysicalPath(
+void TodControls::getTargetFromPhysicalPath(
const TARGETING::ATTR_PHYS_PATH_type &i_path,
TARGETING::Target*& o_pTarget)
{
TOD_ENTER("getTargetFromPhysicalPath");
- errlHndl_t l_err = NULL;
do
{
o_pTarget =
TARGETING::targetService().toTarget(i_path);
- if(o_pTarget == NULL)
- {
- TOD_ERR("Error in getting target from entity path[%s]",
- getPhysicalPathString(i_path));
- /*@
- * @errortype
- * @moduleid TOD_CONTROLS_GET_TARGET
- * @reasoncode TOD_NULL_INPUT_TARGET
- * @devdesc Target ID is invalid
- * @custdesc Service Processor Firmware encountered an internal
- * error
- */
- l_err = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- TOD_CONTROLS_GET_TARGET,
- TOD_NULL_INPUT_TARGET);
- break;
- }
+ TOD_ERR_ASSERT(o_pTarget != NULL,
+ "Error in getting target from entity path[%s]",
+ getPhysicalPathString(i_path));
}
while(0);
TOD_EXIT();
- return l_err;
}
//******************************************************************************
@@ -1589,26 +1606,7 @@ errlHndl_t TodControls::getParent(const TARGETING::Target *i_pTarget,
do
{
- // If i_pTarget is NULL then create an error log
- if(!i_pTarget)
- {
- TOD_ERR("Input Target handle is null");
-
- //Create error
- /*@
- * @errortype
- * @moduleid TOD_UTIL_MOD_GET_PARENT
- * @reasoncode TOD_NULL_INPUT_TARGET
- * @devdesc NULL Target is supplied as input
- * @custdesc Service Processor Firmware encountered an internal
- * error
- */
- l_errl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- TOD_UTIL_MOD_GET_PARENT,
- TOD_NULL_INPUT_TARGET);
- break;
- }
+ TOD_ERR_ASSERT(i_pTarget != NULL, "Input Target handle is null");
// If we have a valid target, check if it is system
l_type = i_pTarget->getAttr<TARGETING::ATTR_TYPE>();
@@ -1635,11 +1633,13 @@ errlHndl_t TodControls::getParent(const TARGETING::Target *i_pTarget,
* error
*/
+ const bool hbSwError = true;
l_errl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_UTIL_MOD_GET_PARENT,
TOD_INVALID_TARGET,
- GETHUID(i_pTarget));
+ GETHUID(i_pTarget),
+ hbSwError);
break;
}
@@ -1701,14 +1701,6 @@ errlHndl_t TodControls::getParent(const TARGETING::Target *i_pTarget,
GETHUID(i_pTarget),
TWO_UINT32_TO_UINT64(l_list.size(), i_class));
- // Assert will R/R the FSP, set the R/R bit in this error
- // to indicate that this error is responsible for the R/R
- //l_errl->setRsrlBit(true);
-
- TOD_ERR_ASSERT(0, "ERROR - Parent not found for the supplied target."
- "Supplied target's HUID: 0x%08X",
- GETHUID(i_pTarget));
-
}
TOD_EXIT();
diff --git a/src/usr/isteps/istep18/TodControls.H b/src/usr/isteps/istep18/TodControls.H
index 96ad14f6d..c17526667 100755
--- a/src/usr/isteps/istep18/TodControls.H
+++ b/src/usr/isteps/istep18/TodControls.H
@@ -828,13 +828,10 @@ private:
* @param[out] o_Target
* Pointer to Target
*
- * @return errlHndl_t
- * Returns error handle if supplied physical path
- * is not valid
- * else NULL
+ * assert if supplied physical path is not valid
*/
- errlHndl_t getTargetFromPhysicalPath(
+ void getTargetFromPhysicalPath(
const TARGETING::ATTR_PHYS_PATH_type &i_path,
TARGETING::Target*& o_pTarget);
diff --git a/src/usr/isteps/istep18/TodDrawer.C b/src/usr/isteps/istep18/TodDrawer.C
index c8c078e3e..4c6335bf4 100755
--- a/src/usr/isteps/istep18/TodDrawer.C
+++ b/src/usr/isteps/istep18/TodDrawer.C
@@ -199,11 +199,13 @@ errlHndl_t TodDrawer::findMasterProc(TodProc*& o_drawerMaster) const
* host
*/
+ const bool hbSwError = true;
l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_FIND_MASTER_PROC,
TOD_NO_MASTER_PROC,
- iv_todDrawerId);
+ iv_todDrawerId,
+ hbSwError);
}
}while(0);
@@ -237,7 +239,7 @@ void TodDrawer::getPotentialMdmts(
{
TOD_ENTER("TodDrawer::getPotentialMdmts");
bool l_isGARDed = false;
- errlHndl_t l_errHndl = NULL;
+ errlHndl_t l_errHdl = NULL;
const TARGETING::Target* l_procTarget = NULL;
@@ -250,15 +252,17 @@ void TodDrawer::getPotentialMdmts(
if ( !(TOD::isProcBlackListed(l_procTarget)) )
{
//Check if the target is not garded
- l_errHndl = TOD::checkGardStatusOfTarget(l_procTarget,
+ l_errHdl = TOD::checkGardStatusOfTarget(l_procTarget,
l_isGARDed);
- if(l_errHndl)
+ if(l_errHdl)
{
TOD_ERR("Failed in checkGardStatusOfTarget() to get the "
" GARD state for the target 0x%.8x",
GETHUID(l_procTarget));
+ errlCommit(l_errHdl, TOD_COMP_ID);
+
//Ignore this target as the gard status for this target
//could not be obtained.
continue;
diff --git a/src/usr/isteps/istep18/TodHwpIntf.C b/src/usr/isteps/istep18/TodHwpIntf.C
index 9495c3ab4..6fede2578 100755
--- a/src/usr/isteps/istep18/TodHwpIntf.C
+++ b/src/usr/isteps/istep18/TodHwpIntf.C
@@ -85,23 +85,6 @@ errlHndl_t todSetupHwp(const p9_tod_setup_tod_sel i_topologyType)
l_pMDMT->getMasterType(),
l_pMDMT->getBusIn(), l_pMDMT->getBusOut());
- /*@
- * @errortype
- * @moduleid TOD_SETUP_HWP
- * @reasoncode TOD_HWP_EXECUTION_FAILED
- * @userdata1 MDMT HUID
- * @userdata2 Topology Type
- * @devdesc Failed to configure TOD toplogy, due to
- * error returned by p9_tod_setup.
- * @custdesc Service Processor Firmware encountered an
- * internal error
- */
- l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- TOD_SETUP_HWP,
- TOD_HWP_EXECUTION_FAILED,
- GETHUID(l_pMDMT->getTarget()),
- i_topologyType);
break;
}
}while(0);
@@ -135,11 +118,13 @@ errlHndl_t todSaveRegsHwp(const p9_tod_setup_tod_sel i_topologyType)
* @custdesc Host failed to boot because there was a problem
* configuring Time Of Day on the Host processors
*/
+ const bool hbSwError = true;
l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_SAVEREGS_HWP,
TOD_NO_VALID_MDMT_FOUND,
- i_topologyType);
+ i_topologyType,
+ hbSwError);
break;
}
@@ -159,21 +144,6 @@ errlHndl_t todSaveRegsHwp(const p9_tod_setup_tod_sel i_topologyType)
l_pMDMT->getMasterType(),
l_pMDMT->getBusIn(), l_pMDMT->getBusOut());
- /*@
- * @errortype
- * @moduleid TOD_SAVEREGS_HWP
- * @reasoncode TOD_HWP_EXECUTION_FAILED
- * @userdata1 Topology Type
- * @devdesc Failed to save TOD configuration registers,
- * due to error returned by p9_tod_save_config.
- * @custdesc Service Processor Firmware encountered an
- * internal error
- */
- l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- TOD_SAVEREGS_HWP,
- TOD_HWP_EXECUTION_FAILED,
- i_topologyType);
break;
}
}while(0);
@@ -209,12 +179,14 @@ errlHndl_t todInitHwp()
* @custdesc Host failed to boot because there was a problem
* configuring Time Of Day on the Host processors
*/
+ const bool hbSwError = true;
l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_INIT_HWP,
TOD_NO_VALID_MDMT_FOUND,
EMOD_TOD_INIT_HWP,
- TOD_PRIMARY);
+ TOD_PRIMARY,
+ hbSwError);
break;
}
@@ -236,22 +208,6 @@ errlHndl_t todInitHwp()
GETHUID(l_pMDMT->getTarget()),
l_pMDMT->getMasterType());
- /*@
- * @errortype
- * @moduleid TOD_INIT_HWP
- * @reasoncode TOD_HWP_EXECUTION_FAILED
- * @userdata1 MDMT HUID
- * @devdesc Failed to initialize TOD, due to
- * error returned by p9_tod_init.
- * @custdesc Service Processor Firmware encountered an
- * internal error
- */
- l_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- TOD_INIT_HWP,
- TOD_HWP_EXECUTION_FAILED,
- GETHUID(l_pMDMT->getTarget()));
-
l_failingTodProc = reinterpret_cast<TARGETING::Target*>(
l_fapiFailingProcTarget.get());
diff --git a/src/usr/isteps/istep18/TodSvc.C b/src/usr/isteps/istep18/TodSvc.C
index dcd8a5eb2..85e89a911 100755
--- a/src/usr/isteps/istep18/TodSvc.C
+++ b/src/usr/isteps/istep18/TodSvc.C
@@ -177,6 +177,7 @@ errlHndl_t TodSvc::todSetup()
"for secondary topology.");
//Report the error as informational - loss of redundancy,
//but no loss of TOD function.
+ errlCommit(l_errHdl, TOD_COMP_ID);
break;
}
@@ -188,7 +189,7 @@ errlHndl_t TodSvc::todSetup()
TOD_ERR("TOD setup failure: failed to create secondary topology.");
//Report the error as informational - loss of redundancy,
//but no loss of TOD function.
-
+ errlCommit(l_errHdl, TOD_COMP_ID);
break;
}
l_secondary.dumpTopology();
@@ -202,7 +203,7 @@ errlHndl_t TodSvc::todSetup()
TOD_ERR("TOD setup failure: secondary topology setup HWP.");
//Report the error as informational - loss of redundancy,
//but no loss of TOD function.
-
+ errlCommit(l_errHdl, TOD_COMP_ID);
break;
}
@@ -377,6 +378,8 @@ errlHndl_t TodSvc::todInit()
if( l_errHdl )
{
TOD_ERR("TOD initialization failed for primary topology : HWP");
+ l_errHdl->setSev(ERRORLOG::ERRL_SEV_UNRECOVERABLE);
+ errlCommit(l_errHdl, TOD_COMP_ID);
break;
}
diff --git a/src/usr/isteps/istep18/TodSvcUtil.C b/src/usr/isteps/istep18/TodSvcUtil.C
index 913120815..522962925 100755
--- a/src/usr/isteps/istep18/TodSvcUtil.C
+++ b/src/usr/isteps/istep18/TodSvcUtil.C
@@ -35,6 +35,7 @@
#include <targeting/common/commontargeting.H>
#include <targeting/common/util.H>
#include <attributeenums.H>
+#include <errl/errlmanager.H>
#include "TodSvcUtil.H"
#include "TodUtils.H"
@@ -71,12 +72,23 @@ void calloutTodEndPoint( const TARGETING::Target* const i_pTodEndPoint,
*/
io_errHdl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
TOD_ENDPOINT_CALLOUT,
TOD_MASTER_PATH_ERROR,
EMOD_CALLOUT_TOD_ENDPOINT,
GETHUID(i_pTodEndPoint));
+ io_errHdl->addHwCallout(
+ i_pTodEndPoint,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::DECONFIG,
+ HWAS::GARD_Fatal);
+
+ //Get the PEER TOD end point on the OSC and callout as low
+ io_errHdl->addProcedureCallout(
+ HWAS::EPUB_PRC_TOD_CLOCK_ERR,
+ HWAS::SRCI_PRIORITY_LOW);
+
//Get the PEER TOD end point on the OSC and callout as low
TARGETING::PredicateCTM l_todEndPointPred(
TARGETING::CLASS_UNIT,TARGETING::TYPE_TODCLK);
@@ -105,10 +117,10 @@ void calloutTodEndPoint( const TARGETING::Target* const i_pTodEndPoint,
if ( !l_todEndPointList.empty())
{
- io_errHdl->addHwCallout((*l_todEndPointList.begin()),
- HWAS::SRCI_PRIORITY_LOW,
- HWAS::DECONFIG,
- HWAS::GARD_Fatal);
+ io_errHdl->addHwCallout((*l_todEndPointList.begin()),
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::DECONFIG,
+ HWAS::GARD_Fatal);
}
@@ -190,6 +202,7 @@ uint32_t getMaxProcsOnSystem()
else
{
TOD_ERR("getMaxConfigParams() Failed");
+ errlCommit(l_errHdl, TOD_COMP_ID);
}
return (l_maxProcCount);
OpenPOWER on IntegriCloud